Closed smallfx closed 2 years ago
There's two bugs in your program:
gameBuffer.g4.setPipeline(gameProcessingPipeline);
before the setFloat call so the correct pipeline is set (g2.pipeline = whatever doesn't actually set the pipeline but just remembers it for whenever it actually draws something next).
Describe the bug
Example code here: https://github.com/smallfx/kha_issues
I am on Windows 11, and I'm experiencing some weirdness with the
opengl
graphics target when compiling for Windows and HTML5. (in the case of HTML5 I guess it would be opengl es?) Anecdotally this was also observed on Windows 10 after upgrading to a recent version of Kha, although I can't test that anymore because I upgraded to 11.For the OpenGL graphics target, it seems like setting a uniform float using
my_cool_framebuffer.g4.setFloat()
does not take effect. It should be noted that it can be observed to take effect properly when compiling with default graphics (as mentioned above).(It should also be noted that I am using a custom
g2
(aptly namedCustomG2
) to more closely replicate my engine's setup and to have a customuseCanvas
function. In my engine it is also used to add additional things to the vertex structure by default, etc.)To Reproduce Steps to reproduce the behavior:
cd
to thekha_issues
cloned git repo directory.node <KHA_DIRECTORY>\Tools\khamake\khamake.js --run --graphics opengl
(compiling for HTML5 results in the same thing)g4.setFloat()
)Expected behavior It is expected that setting the
screenDarkenUniform
uniform withg4.setFloat()
would darken the rendered image according to the shader specified in the custom pipeline.Execution Environment:
Build time: 0m 39s Starting Kinc Initializing a new default audio device. Falling back to the system's preferred WASAPI mix format. Starting application