mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-03 17:37:18 +00:00
Add support for GL_AMBIENT colorMode to shaders as required by particle systems
This commit is contained in:
parent
206e2bf975
commit
45ae8d5ffa
@ -272,6 +272,9 @@ namespace Shader
|
||||
{
|
||||
switch (reqs.mVertexColorMode)
|
||||
{
|
||||
case GL_AMBIENT:
|
||||
defineMap["colorMode"] = "3";
|
||||
break;
|
||||
default:
|
||||
case GL_AMBIENT_AND_DIFFUSE:
|
||||
defineMap["colorMode"] = "2";
|
||||
|
@ -5,7 +5,10 @@ vec4 doLighting(vec3 viewPos, vec3 viewNormal, vec4 vertexColor)
|
||||
vec3 lightDir;
|
||||
float d;
|
||||
|
||||
#if @colorMode == 2
|
||||
#if @colorMode == 3
|
||||
vec4 diffuse = gl_FrontMaterial.diffuse;
|
||||
vec3 ambient = vertexColor.xyz;
|
||||
#elif @colorMode == 2
|
||||
vec4 diffuse = vertexColor;
|
||||
vec3 ambient = vertexColor.xyz;
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user