mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
Replace switch with ifs in shader
This commit is contained in:
parent
ea5e078526
commit
390838e084
@ -41,13 +41,12 @@ void main(void)
|
||||
{
|
||||
vec3 c;
|
||||
|
||||
switch (mapping)
|
||||
{
|
||||
case 0: c = sphericalCoords(uv); break;
|
||||
case 1: c = cylindricalCoords(uv); break;
|
||||
case 2: c = planetCoords(uv); break;
|
||||
default: c = sphericalCoords(uv); break;
|
||||
}
|
||||
if (mapping == 0)
|
||||
c = sphericalCoords(uv);
|
||||
else if (mapping == 1)
|
||||
c = cylindricalCoords(uv);
|
||||
else
|
||||
c = planetCoords(uv);
|
||||
|
||||
gl_FragData[0] = textureCube(cubeMap,c);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user