Timeline for How to write a shader that only uses a bump map without a normal map
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 15, 2019 at 20:09 | vote | accept | Ray Hulha | ||
Aug 14, 2019 at 23:17 | comment | added | Ian Young | I have actually added an answer to the question you linked as well, which should help both you and the OP | |
Aug 14, 2019 at 23:04 | comment | added | Ian Young | Put simply, the person who wrote that code, should be sampling a normal map, not a bump map. The wrong texture is being used. I would recommend you use a normal map too. It's superior in every regard, and is an industry standard technique. | |
Aug 14, 2019 at 19:57 | comment | added | Ray Hulha | But my point is, as far as I can tell, that the line of code does not come from a shader using normal mapping. Then it would be easy. The line of code comes from a shader using a bump/height map. That is the hard to understand part... | |
Aug 14, 2019 at 17:50 | comment | added | Ian Young | That line of code is nothing more than transforming the sampled colour out of tangent space and into view space. I recommend reading learnopengl.com/Advanced-Lighting/Normal-Mapping for a better explanation. | |
Aug 14, 2019 at 14:37 | comment | added | Ray Hulha | Very interesting! Are you able to explain the line of code that I posted above ? I don't see any other texture lookups or sobel operations in the code from the link either. | |
Aug 14, 2019 at 14:22 | history | answered | Ian Young | CC BY-SA 4.0 |