Jump to content
  • Advertisement
Sign in to follow this  
Alundra

Lot of shaders possibilities which ends to lot of shader compilation needed

This topic is 433 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,
Using NormalMap, RoughnessMap, MetalnessMap, TwoSided, Self-IllumMap, OpacityMap ... and also IBL used or not.
And also if a map is not used but a value, you also end to a new shader compilation to not sample but use the value instead.
You end with lot of shader compilation to avoid to use one of them or them combined, at least I only see this solution actually.
Actually I simply send a 1x1 white or black texture but that means one sample for each type in case of used or not.
Actually I simply check for the normal map to avoid to compute the TBN.
Lot of shader mode using defines is the only way ?
Thanks

Edited by Alundra

Share this post


Link to post
Share on other sites
Advertisement

if it depends on a coherent flag (e.g. a constant for the whole draw call), you can use dynamic branching nowadays, there won't be a big performance impact, might be even faster as you don't need to switch shaders that many times.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!