lambdacube-compiler
lambdacube-compiler copied to clipboard
Request: Texture2D size from int uniform
Tried to implement deffered rendering, hit the following:
windowSize = V2 (Uniform "windowWidth") (Uniform "windowHeight") :: Vec 2 Int
renderFrame $ let
texture = Texture2D windowSize . PrjImageColor $ makeDiffuseBuffer
in ...
Fails with:
src/LambdaCube/Compiler/CoreToIR.hs:(624,18)-(631,25): Non-exhaustive patterns in case
I think, the following line is causing this: https://github.com/lambdacube3d/lambdacube-compiler/blob/master/src/LambdaCube/Compiler/CoreToIR.hs#L628
This is related to dynamic pipelines what we don't support yet, but it is on the roadmap. I think you have to stick to a specific texture size for now. The problem source is that the system can not reallocate resources at runtime, therefore the the pipeline structure and resource parameters can not depend on user input. So the pipeline is static.
Thank you, I will disable resizing of window for now. Amazing project, shadow mapping with deffered passes in 30 minutes and 100 clocs.