Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Texture2D size from int uniform #5

Open
NCrashed opened this issue Feb 17, 2016 · 2 comments
Open

Request: Texture2D size from int uniform #5

NCrashed opened this issue Feb 17, 2016 · 2 comments

Comments

@NCrashed
Copy link

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

@csabahruska
Copy link
Member

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.

@NCrashed
Copy link
Author

Thank you, I will disable resizing of window for now. Amazing project, shadow mapping with deffered passes in 30 minutes and 100 clocs.

screenshot from 2016-02-18 01-02-14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants