Blenra LogoBlenra
Optimized for: Gemini / ChatGPT / Claude
#ThreeJS

Custom Shader Deformation via Physics Contact Data

Customize the variables below to instantly engineer your prompt.

Required Variables

r3f-shader-physics-collision-mask.txt
Act as a Technical Shader and Physics Artist. Architect a highly complex data bridge between the physics collision engine and raw GLSL vertex shaders in R3F. You must extract exact contact point coordinates and impact velocities from the Rapier collision manifold, format them into a `DataTexture` or Float32Array, and pass them directly as a [GLSL_UNIFORM_NAME] into a custom ShaderMaterial. Utilize this data within the vertex shader to mathematically displace vertices, creating a permanent, physical [DEFORMATION_RADIUS] effect (such as dents in metal or ripples in mud) exactly at the point of impact. Explain the precise array-management logic required to maintain a [CONTACT_BUFFER_SIZE] cap, ensuring the GPU can handle multiple, simultaneous ballistic impacts efficiently without crashing.

Example Text Output

"A React Three Fiber setup using a data texture to pass collision coordinates into a vertex shader for real-time mesh displacement."

More Web Components Prompts

View all →

Frequently Asked Questions

What is the "Custom Shader Deformation via Physics Contact Data" prompt used for?

A React Three Fiber setup using a data texture to pass collision coordinates into a vertex shader for real-time mesh displacement.

Which AI tools work with this prompt?

This prompt is optimized for Gemini / ChatGPT / Claude, but works great with ChatGPT, Claude, Gemini, and other large language models. Simply copy it and paste it into your preferred AI tool.

How do I customize this prompt?

Use the variable fields above to fill in your specific details. The prompt will auto-update as you type, ready to copy instantly.

Is this prompt free?

Yes! All prompts on Blenra are free to copy and use immediately. No account required.