ptitSeb / gl4es

GL4ES is a OpenGL 2.1/1.5 to GL ES 2.0/1.1 translation library, with support for Pandora, ODroid, OrangePI, CHIP, Raspberry PI, Android, Emscripten and AmigaOS4.
http://ptitseb.github.io/gl4es/
MIT License
704 stars 160 forks source link

Glsl transpose work wrongly? #346

Closed Sisah2 closed 2 years ago

Sisah2 commented 3 years ago

This is more like a question, but there are new openmw shaders available and there is mat3 transpose function that seems to work differently on desktop opengl and gl4es, on desktop it work fine, with gl4es things that was dependant on it was moving with camera, it was fixed replacing build-in transpose function with

highp mat3 transpose2(in highp mat3 inMatrix) { highp vec3 i0 = inMatrix[0]; highp vec3 i1 = inMatrix[1]; highp vec3 i2 = inMatrix[2];

highp mat3 outMatrix = mat3( vec3(i0.x, i1.x, i2.x), vec3(i0.y, i1.y, i2.y), vec3(i0.z, i1.z, i2.z) ); return outMatrix; }

I think those functions in shaderconv dont do any reorder, input = output;

ptitSeb commented 2 years ago

yes, shaderconv doesn't reordor things. What transpose function was used, the internal one?

AbduSharif commented 2 years ago

Those modded PBR shaders for OpenMW, they only work with a development build or commit from Oct 8 2021: https://usaupload.com/6eQP/openmwPBRalphav05.7z https://usaupload.com/6eQO/openmwPBRalphav05hotfix.7z

You need a mod with Parallax Maps, I think this one does: https://www.nexusmods.com/morrowind/mods/44536

(Remember to enable the needed settings).

This too but it's a big download for the file with parallax: https://www.nexusmods.com/morrowind/mods/42575?tab=files

ptitSeb commented 2 years ago

@AbduSharif is your comment for me or for @Sisah2 (because if it's for me, I don't understand the point)

AbduSharif commented 2 years ago

It was for you as I thought you wanted to test if the change works (which you could test with those shaders, they make use of it, but needs parallax maps):

What transpose function was used, the internal one?

I could be misunderstanding I guess.

ptitSeb commented 2 years ago

But openmw use an internal copy of gl4es IIRC. Also, I don't have a setup an android developpement environment.

Anyway, the internal transpose function of gl4es were indeed doing nothing. It should be fixed now.

AbduSharif commented 2 years ago

Thanks.

Sisah2 commented 2 years ago

Yeah, thanks, it used this internal function "gl4es_transpose" shoul be fine now, so closing this.