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;
|
||||
|
||||
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 a new issue