camera texture

Blitz3D Forums/Blitz3D Programming/camera texture

yoshark(Posted 2013) [#1]
I tried putting a texture on my camera and it gave the error "entity is not a model". Lets say I wanted to put a texture in front of the camera and then make it translucent. I know how to use cameraclscolor but is there a way to use a texture on the camera?


RemiD(Posted 2013) [#2]
If you don't need the image to have variable transparency, you can use an image of the width and height of the screen and draw the image last.

If you need the image to have variable transparency, you can use a quad mesh and a texture and position the quad mesh just in front of the camera, and set the quad mesh as a child of the camera (so that it will turn/move with it) and use EntityOrder(QuadMesh,-1) so that it will be drawn last.
Then you can draw on the texture and the result will be shown on the quad mesh.

There are some examples of how to create a quad in the code archives.