Closed syntheticmagus closed 1 year ago
output is different: packing to 4 floats VS returning 1 float. This is generally the case when you don't have float texture support and pack a float to RGBA8. Looking at the caps in native engine, I think it's the case here: https://github.com/BabylonJS/Babylon.js/blob/c89dbd5ae3ccb3126aa03c84869fbdfa8b7f3e7b/src/Engines/nativeEngine.ts#L851
We need to check if this still repros since we added float texture support.
Some more flags are needed to get same shaders between web and native on my PC: https://github.com/BabylonJS/Babylon.js/blob/18d6cdcda0438711750b4a411e60af7906a4e050/packages/dev/core/src/Engines/nativeEngine.ts#L246 Once tweaked with same caps between web and native, I can see the same shader. Closing this issue: validation tests are testing shadow and this issue exists for the caps : https://github.com/BabylonJS/BabylonNative/issues/553
For questions, please use the forum.
Describe the bug Under certain poorly-understood conditions, Babylon.js seems to be sending different shadow shader code to Native than it does to the browser.
From Spector.js:![spectorjs](https://user-images.githubusercontent.com/33846034/127385174-2e8b2a0a-c745-4fb0-bf00-6e29197d9fd3.png)
From ShaderCompilerD3D.cpp:![vsdebugger](https://user-images.githubusercontent.com/33846034/127385208-bc21d0b2-1645-49aa-a76a-f1ee47a1d183.png)
To Reproduce Replace the default light creation in experience.js with something like the following:
Compare with a similarly established Playground on the Web.
Expected behavior If different shader code is passed to Native versus the Web, I would expect that difference to be required to make the shadows work. As it stands, the shadows don't render, and it's unclear why the shader source is different.