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

add prepass texture bindings #20

Closed
wants to merge 1 commit into from

Conversation

robtfm
Copy link

@robtfm robtfm commented Sep 15, 2022

still todo: use custom material vertex shader

done:

add custom material plugin (works for prepass as long as the vertex shader is left as default)

add bindable depth texture output

ViewNormalsTexture -> ViewPrepassTextures, include depth texture
settings -> include depth_resource: bool
copy depth output so it can be bound

bind to mesh view

create multisampled pipeline layout
select normal/multisampled layout based on samples in specialization
add fallback sysparams to generate required fallbacks
bind depth and normal textures or fallbacks to view group
add bindings to mesh_view_bindings.wgsl
add helpers to utils (should not live here ultimately though because they use the view bindings)

tested for msaa on/off, depth prepass on/off. not tested changing msaa at runtime, should be fine though.

@robtfm robtfm closed this Jan 15, 2023
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

Successfully merging this pull request may close these issues.

1 participant