Another Shader Question (or two)

Posted By: Red Ocktober

Another Shader Question (or two) - 09/21/04 07:55

(1) can you use more than 1 shader at a time in 3DGS?
(2) can you use more than 1 shader to different parts of level geometry st the same time in 3DGS?
(3) anyone have any screenshots of any of the above?


THANKS

--Mike
Posted By: Matt_Aufderheide

Re: Another Shader Question (or two) - 09/21/04 08:26

1) you can use as many shaders as you want.
2) you can use one shader per texture on world geometry. therefore if a block has 4 different textures applied to it's faces it can have 4 different shaders.
Posted By: Red Ocktober

Re: Another Shader Question (or two) - 09/21/04 09:31

Thanks for the helpful info Matt...

looks like i'll be upgrading the license to 6.2,.3,etc...

one more thing... do you notice a significant performance hit as the number of shaders being used increases...

THANKS again

--Mike
Posted By: myrlyn68

Re: Another Shader Question (or two) - 09/21/04 10:34

Depends on the shaders used (and video card...). Some like the fur shader will hammer the frame rate, others are not so bad. Newer video cards handle the shaders a lot better than older video cards as well (making the hit on the older cards twice as bad when using shaders...once for being slow and again for being slow processing shaders).
Posted By: Red Ocktober

Re: Another Shader Question (or two) - 09/21/04 10:42

Thanks Myrlyn...

for right now i really plan to use a bumpmap shader with different textures for a weathered metallic look...

... and maybe a shiny metallic one also.

do you think that those would be hard on say a radeon 9200 or a basic geforce ps 1.4 limited card?


--Mike
Posted By: myrlyn68

Re: Another Shader Question (or two) - 09/21/04 10:52

Hrmmm...

I could make it hard...then again you can also make it easy.

Take a good hard look at how shaders work and spend some time learning how to optimize them. Clean code runs much better than sloppy code...even when it is going through the GPU.

Other than that - bumpmapping can be very taxing when you have a lot of lights in the scene and a lot of texture space to be transformed. There are a lot of tricks invloved in the performance tweaking aspects (enough to fill an entire shelf of my library and then some). Read up and try it out - getting the desired shader working is easy - getting it to work efficiently is the tricky part.

Also - combine shaders where you can...you can get away with using a bump shader than following with others - it will run faster when it is a single process.
Posted By: Red Ocktober

Re: Another Shader Question (or two) - 09/21/04 11:33

Quote:

Take a good hard look at how shaders work and spend some time learning how to optimize them.




... sounds like a plan.

THANKS again for sharing your insights on this topic.

--Mike
Posted By: iprogramgames2

Re: Another Shader Question (or two) - 09/21/04 13:19

Here is my question: How do I "turn off" a shader as "my.material=null;" will crash the engine as I have read in a different thread.
Posted By: Matt_Aufderheide

Re: Another Shader Question (or two) - 09/21/04 14:52

just use my.material=mat_model;
Posted By: iprogramgames2

Re: Another Shader Question (or two) - 09/22/04 02:22

That is freakin great

Thanks!
© 2024 lite-C Forums