Jump to content
  • Advertisement
Sign in to follow this  

shaders an front/back face

This topic is 2607 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

I wish create a shader solution for a sketchup importer with front/back material.
I have five possible shaders :
1)double texture
2)single texture(can be front face texture or back face texture)
3)single texture and color (can be front face texture or back face texture and a color face)
4)single color(can be front face color or back face color)
5)two colors

now, i think to create a hybrid method: in the shader i have developed a solution for establish if
the current pixel of the face is back or front(in the pixel shader) , and i wish send via constant buffers the two possible color .
Is a good solution send always two float4 that are frontColor and backColor and if the front or back color is 0. establish the face front/back otherwise if there are two color or none color i'm in the double texture or double color case?
What is the command for test if a float4 is 0. 0. 0. 0.?


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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!