mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-03 17:37:18 +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;
|
vec3 c;
|
||||||
|
|
||||||
switch (mapping)
|
if (mapping == 0)
|
||||||
{
|
c = sphericalCoords(uv);
|
||||||
case 0: c = sphericalCoords(uv); break;
|
else if (mapping == 1)
|
||||||
case 1: c = cylindricalCoords(uv); break;
|
c = cylindricalCoords(uv);
|
||||||
case 2: c = planetCoords(uv); break;
|
else
|
||||||
default: c = sphericalCoords(uv); break;
|
c = planetCoords(uv);
|
||||||
}
|
|
||||||
|
|
||||||
gl_FragData[0] = textureCube(cubeMap,c);
|
gl_FragData[0] = textureCube(cubeMap,c);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user