diff options
author | Kevin Ottens <kevin.ottens@kdab.com> | 2017-08-03 10:00:41 +0200 |
---|---|---|
committer | Kevin Ottens <kevin.ottens@kdab.com> | 2017-09-27 18:11:07 +0000 |
commit | 6b264d4a2f45508d40642553dfbf988080270217 (patch) | |
tree | d554693f7e470f77ea76eefa34b2fc83f6c14383 /src | |
parent | 1908a4e13bc85b1bb5a7d30a5e4a08850e46f4cd (diff) |
Add phongFunction to the nodes prototypes
Change-Id: Iad0b51e19cc78683f18db0ae2718df6abd4ba72f
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/render/materialsystem/prototypes/default.json | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/render/materialsystem/prototypes/default.json b/src/render/materialsystem/prototypes/default.json index 97ce7e0fd..a3a8deae6 100644 --- a/src/render/materialsystem/prototypes/default.json +++ b/src/render/materialsystem/prototypes/default.json @@ -395,6 +395,40 @@ } ] }, + "phongFunction": { + "inputs": [ + "ambient", + "diffuse", + "specular", + "shininess", + "worldPosition", + "worldView", + "worldNormal" + ], + "outputs": [ + "outputColor" + ], + "rules": [ + { + "format": { + "api": "OpenGLES", + "major": 2, + "minor": 0 + }, + "substitution": "highp vec4 $outputColor = phongFunction($ambient, $diffuse, $specular, $shininess, $worldPosition, $worldView, $worldNormal);", + "headerSnippets": [ "#pragma include :/shaders/es2/phong.inc.frag" ] + }, + { + "format": { + "api": "OpenGLCoreProfile", + "major": 3, + "minor": 0 + }, + "substitution": "vec4 $outputColor = phongFunction($ambient, $diffuse, $specular, $shininess, $worldPosition, $worldView, $worldNormal);", + "headerSnippets": [ "#pragma include :/shaders/gl3/phong.inc.frag" ] + } + ] + }, "metalRoughFunction": { "inputs": [ "baseColor", |