Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GLSL Shader Displaying Sharpened Normal Data

1 REPLY 1
Reply
Message 1 of 2
bendaviesorg
298 Views, 1 Reply

GLSL Shader Displaying Sharpened Normal Data

I'm currently practicing the creation of identical GLSL shaders for Unity and Maya, and have noticed that despite using what should be equivalent normal data, the shader output visibly differs.

 

With Unity (Left), I take in the built-in gl_Normal data stream during the Vertex stage, and then display the data during the Fragment stage, which comes out looking quite smooth.

 

A nearly equivalent operation on the same mesh is performed in Maya (Right). I take in data from the application NORMAL attribute during the Vertex stage and swizzle x and z (to account for the left/right-handed discrepancy between applications), before displaying the data during the Fragment stage. However, the output data appears much sharper.

 

Does anyone know what might be causing Maya to be displaying the mesh normals differently, and if there's a way of replicating the smooth normal shading that I'm receiving when using an equivalent normal shader in Unity?

 

Labels (4)
1 REPLY 1
Message 2 of 2
negow
in reply to: bendaviesorg

It's not clear from your screenshot whether you have a View Transform active (a.k.a. Color Management), or which version of Maya you are using. In 2022, the default view transform changed, and they would apply a LUT onto your GLSL shader. Could be unrelated, but that was my first thought.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report