-
Notifications
You must be signed in to change notification settings - Fork 16
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
Expose debug render mode in standard renderer #319
Comments
Alternative approach with the downside of needing to do that per entity would be const entity = createEntity({
id: "cube1",
transform: components.transform(),
geometry: components.geometry(cube()),
material: components.material({
inject: {
AFTER_FILNAL_COLOR: /*glsl*/`gl_FragData[0] = vec4(data.normalView, 1.0);`
}
})
})
`` |
Somewhat related issue #249
Some remarks:
Sounds a bit more flexible than on the render system (although I understand probably more implementation work) and could be added in a loop if you have many entities : world.entities.forEach(({ material }) => material?....); |
Current solution, string replace: pex-renderer/systems/renderer/standard.js Lines 251 to 274 in 90a39cb
|
We can clean it up a bit but appending debugRender code to FRAG_END hook saving us from one extra string replace. |
My current idea is
This would inject code to overwrite output color with specified data for both opaque and transparent entities.
Q:
debugRender
,debugMode
,renderMode
?The text was updated successfully, but these errors were encountered: