• Create Account

### #ActualMarkS

Posted 21 December 2012 - 01:10 AM

My understanding, although I have never done it personally, is that you can have as many shaders as you like, but only one main function.

So, you could have:

//shader1.fs <- Separate files
{
}

{
}

{
}

main()
{
}

But not:

//shader1.fs <- Separate files

{
}

main()
{
}

{
}

main()
{
}

{
}

main()
{
}

### #5MarkS

Posted 21 December 2012 - 01:09 AM

My understanding, although I have never done it personally, is that you can have as many shaders as you like, but only one main function.

So, you could have:

//shader1.fs <- Separate files
{
}

{
}

{
}

main()
{
}

But not:

//shader1.fs <- Separate files

{
}

main()
{
}

{
}

main()
{
}

{
}

main()
{
}

### #4MarkS

Posted 21 December 2012 - 01:09 AM

My understanding, although I have never done it personally, is that you can have as many shaders as you like, but only one main function.

So, you could have:

//shader1.fs <- Separate files
{
}

{
}

{
}

main()
{
}

But not:

//shader1.fs <- Separate files

{
}

main()
{
}

{
}

main()
{
}

{
}

main()
{
}

### #3MarkS

Posted 21 December 2012 - 01:08 AM

My understanding, although I have never done it personally, is that you can have as many shaders as you like, but only one main function.

So, you could have:

//shader1.fs <- Separate files
{
}

{
}

{
}

main()
{
}

But not:

//shader1.fs <- Separate files

{
}

main()
{
}

{
}

main()
{
}

{
}

main()
{
}

### #2MarkS

Posted 21 December 2012 - 01:07 AM

My understanding, although I have never done it personally, is that you can have as many shaders as you like, but only one main function.

So, you could have:

//shader1.fs <- Separate files
{
}

{
}

{
}

main()
{
}

But not:

//shader1.fs <- Separate files

{
}

main()
{
}

{
}

main()
{
}

{
}

main()
{
}

### #1MarkS

Posted 21 December 2012 - 01:06 AM

My understanding, although I have never done it personally, is that you can have as many shaders as you like, but only one main function.

So, you could have:

//shader1.fs
{
}

{
}

{
}

main()
{
}

But not:

//shader1.fs
{
}

main()
{
}

{
}

main()
{
}

{
}

main()
{
}