Closed Makio64 closed 2 days ago
Also I was wondering if Three have a current system to check the output of the shaders ?
For a given mesh, you can query vertex and fragment shader like so:
console.log( await renderer.debug.getShaderAsync( scene, camera, mesh ) );
getShaderAsync()
gives you an object holding the vertex and fragment shader string for the current configured backend. If you want to force GLSL output, you have to create the renderer via forceWebGL: true
. Or use a browser that does not support WebGPU yet.
You might want to use the dev
branch since there is a minor bug in r170
that breaks the method, see #29832.
I was wondering if this seems ok to you in terms of performance ?
I don't see an obvious flaw.
Description
I like to use different kind of noise in my projects and i optimized them a lot for this purpose like ashima snoise : https://www.shadertoy.com/view/4sdGD8
When I translate it to tsl using the tsl-translator ( https://threejs.org/examples/?q=tsl%20to#webgpu_tsl_editor ) it give me something like :
Solution
I was wondering if this seems ok to you in terms of performance ?
Also I was wondering if Three have a current system to check the output of the shaders ?
Alternatives
RawShaderNodeMaterial( gslVertexShader, gslFragmentShader, wgslVertexShader, wgslFragmentShader )
Additional context
No response