Posts

Showing posts with the label depth

Custom Render Texture not updating when Double Buffered? WHY?

Image
There are two ways to fix this - one is in the update shader - make sure you have ZTest Always in your subshader block. OR (and I think this is something I was doing by accident, in order to make the custom render textures tile) you can disable depth on the custom render texture itself in the Inspector. This is probably a "well duh" to seasoned shader masters, but I must have spent 3 hours cursing Unity trying to figure out what was wrong. The other reason your CRT might not be updating is if you've set your initialisation to Realtime, which means it's always initialising!     SubShader     {                  Cull Off             ZWrite Off             ZTest Always         Pass         {    Name "update RD"    ...

VLC stream to render texture

   In VLC, click Stream Select your media, click stream Add a HTTP, choose a port - say "8080", and give it a name, lets say "q" Make sure you activate "transcoding". Select Ogg as the main wrapper. In the video codec tab, select "Theora" (this is the ogg video codec I think). Save this preset, hit next and then finally Stream. I haven't figured out how to stream a playlist yet. Perhaps using VLC in command line mode?   In Unity, create a Videoplayer object. Set it to render to a Render Texture(and assign this render texture to a material on a quad or something). For the video player's source, set it to URL and enter something resembling the following - http://192.168.1.44:8080/q the 192.168.1.44 will be your machine's IP (run ipconfig in command prompt to find out what it actually is). The :8080 is to access the port you specified earlier, the "q" is what we named the stream. Now if you hit play , your object should have th...