See T48453 for details and test scenes
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
Comment Actions
The main drawback that I can see is two switches for nm->space that are confusing. And I think that convertion can be simplified.
| source/blender/gpu/shaders/gpu_shader_material.glsl | ||
|---|---|---|
| 145 | These glsl functions came from Сycles logic? Or it's just heuristics? | |
| source/blender/nodes/shader/nodes/node_shader_normal_map.c | ||
| 158 | Broken indentation | |
Comment Actions
Hi @Alexander Romanov (a.romanov),
thanks for the review!
I tried to address your comments by rearranging the logic into a more readable form. Now there is a clear separation by shading type and I also got rid of the second switch by nm->space.
| source/blender/gpu/shaders/gpu_shader_material.glsl | ||
|---|---|---|
| 145 | This function exists because in Cycles, the y component of the normal is not flipped like in BI. | |
| 152 | ||
| source/blender/nodes/shader/nodes/node_shader_normal_map.c | ||
| 158 | Rearranged and fixed, thanks! | |
Comment Actions
It's ok for me now. BI behavior is correct. @Sergey Sharybin (sergey), would you make a final review?