What happened to my render target?

Hey everyone, I’m trying to use a shader as a heightmap. So to start, I wanted to try using a render target as the texture for an object. However, something’s wrong with my code:

If you visit the site (shaders-threejs.glitch.me/rentarg.html), there’s just a gray screen. If I comment out the render target code and just display the cube by itself, it displays ok. Anyone have any ideas on what’s happening?

(quite a bit of my code comes from Three.js Render Targets)

Thanks in advance!

Are your shaders compiling? Any errors in the console?

The shaders are compiling - you can visit shaders-threejs.glitch.me which has the original shaders rendering. There also aren’t any errors in the console. I think something is wrong with how the render target is executing my shaders (maybe the cube is rendering transparent?), but I have no clue what it could be…

The problem was I was clearing my render target and rendering in the wrong order. smh…