Discussions for Scenes for Version 1.2.X Fullscreen Mode here
Tutto su iStripper
December 11, 2015, 5053 risposte
I have just uploaded a number of scenes to TheEmusNest as announced in the "Share Your Fullscreen Scenes" thread. Here I remark on some techninal problems that I had with some of the senes as that may be of interrest to others that are creating full screen scenes.
Prior to upgrading to Windows 10 I had noticed that a number of the glslsandbox and shadertoy adaptions were behaving differently depending on whether I was running them using my laptop's Intel Integrated Graphics Processor or my its NVIDIA GPU. In some cases there were obvious failures when using one of the GPUs, usualy but not always the Intel version was "wrong", but in a small number of cases it was unclear which gave the correct result.
I had sorted out most of the discrepancies before upgrading to Windows 10, but this upgrade causes a few more failures to occur.
The problems were with the following files
Shaders = ShaderToy = Nimitz - Overly Satisfying.fsh
Shaders = ShaderToy = Nimitz - Overly Satisfying - Rotated.fsh
Shaders = ShaderToy = FlyGuy - Neon Tube Digits.fsh
Shaders = ShaderToy = Dila - Birth Machine.fsh
Shaders = ShaderToy = Dila - Machine Room.fsh
Shaders = ShaderToy = Dila - Silo.fsh
Shaders = ShaderToy = Kali - Avatar.fsh
Shaders = ShaderToy = Kali - Dawn of the Tentacle.fsh
Shaders = ShaderToy = Kali - Emerging Tower.fsh
Shaders = ShaderToy = Kali - It's a Kind of Magic.fsh
Shaders = ShaderToy = Nimitz - Plasma Globe.fsh
Shaders = ShaderToy = Others - Danguafer - Am I Doing It Right.fsh
Shaders = ShaderToy = Others - Linus Martensson - Seascape + Horizon.fsh
Shaders = ShaderToy = FlyGuy - Mechanical Brain.fsh
Shaders = ShaderToy = Eiffie - Box-o-Lights.fsh
Shaders = ShaderToy = Others - Shezard - Knotting.fsh
Shaders = ShaderToy = Others - Phil Lira - Multibrot Animation.fsh
Shaders = ShaderToy = Others - Mpcomplete - Mpcomplete.fsh
Shaders = ShaderToy = Others - Ben Raziel - Flappy Bird.fsh
Shaders = GlslSandbox - Unknown - e#21515.101
Shaders = GlslSandbox - Unknown - e#22014.1 - [Unknown Fractal - 1].fsh
Shaders = GlslSandbox - Unknown - e#22014.1 - [Unknown Fractal - 2].fsh
Shaders = GlslSandbox - Unknown - e#22014.1 - [Unknown Fractal - 3].fsh
If you are at all interrested in seeing the changes I made to these shaders, or just to easily see what is new, then I recommend that you use a good file and directory compare program such as Beyond Compare, which I find invaluable.
--------------------------------------------------------
In most of the cases the problems were only seen when using the Intel GPU and of these most were due to the same problem - an error by the compiler in handling expressions multiplying a vector by a matrix. An expression such as
v *= m;
where v is a vec type and m a mat type should be equivalent to
v = v * m;
which implies the use of an intermediate variable to hold the result before copying it to v. This is needed because if one is not used then the statement compiles to something like
v[0] = v[0]*m[0,0] + v[1]*m[0,1];
v[1] = v[0]*m[1,0] + v[1]*m[1,1];
where, if the staements are executed sequentialy, the v[0] in the second assignment is not the original value, as it should be, but the result of the first assignment. There is no need for an intermediate variable if the two assignments are executed in parallel - which a GPU, even the Intel GPU, should be able to do.
The Intel compiler was handling the v=v*m form correctly but failing for the v*=m form. Whether the real failing is in the Intel compiler or the hardware is not clear.
After upgrading to Windows 10 a similar failing was seen in other shaders that had previously not had any problems, this time it involved expressions that contained vec*mat subexpressions, for example
return z - ( cdiv(CE,(CE+z*z)) + CE*2.0*(mouse.x-0.5) );
where CE was of type mat4 and mouse of type vec4. In such cases itproved possible to avoid the problem by using slightly modified forms of the expressions, in the above case the problem was