mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 16:15:31 +00:00
Replace switch with ifs in shader
This commit is contained in:
parent
ea5e078526
commit
390838e084
1 changed files with 6 additions and 7 deletions
|
@ -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 a new issue