←back to thread

218 points ahamez | 1 comments | | HN request time: 0s | source
Show context
phkahler ◴[] No.42728459[source]
Is there a standard OpenGL (ES3) shader I can drop in a GPLed application that uses a decent (is there a standard?) BRDF similar to Schlick with red,green,blue, and roughness?

I've wanted to add this capability to Solvespace for a while. I did my own implementation with the Fresnel term and it looked OK, but I want something "standard" and correct.

replies(5): >>42729134 #>>42730403 #>>42731800 #>>42734243 #>>42739761 #
1. Pathogen-David ◴[] No.42730403[source]
You might find value in the glTF sample renderer https://github.com/KhronosGroup/glTF-Sample-Renderer

It won't be plug and play since you'd have to pull out the shaders and make them work in your app, but the implementation supports quite a few material variants. The PBR shader implementation starts in source/Renderer/shaders/pbr.frag