Unity 5 - Shader( matrix [_Projector] ) SOLVED

Hello to the projection texture I used this shader that I found on the internet …
It worked well… but with the advent Unity5 is the function matrix [_projector] does not work = (

Can anyone help me fix this shader? Thanks :wink:

Shader “Projector/Texture”
{
Properties
{
_Color (“Main Color”, Color) = (1,1,1,1)
_ShadowTex (“Cookie”, 2D) = “gray” {}
}

Subshader
{
Tags { “RenderType” = “Transparent” “Queue” = “Transparent-1” }
Pass
{

ZWrite Off
Lighting Off
Fog { Color (0, 0, 0, 0) }
ColorMask RGB
Blend SrcAlpha OneMinusSrcAlpha
Offset -1, -1
Color [_Color]

SetTexture [_ShadowTex]
{
combine texture * primary
Matrix [_Projector]
}
}
}
}

2078795–135784–Texture.shader (503 Bytes)

nobody ? :-/

I don’t have Unity4 to test how it should work.
Is it what you need?

2083910–136238–Projector_Texture.shader (1.47 KB)

1 Like

aaa THANKS YOU! works perfectly! =)

Shader “Hidden/PreviewT4M”
{
Properties
{
_Transp (“Transparency”, Range(0,1)) = 1
_MainTex (“Texture”, 2D) = “” { }
_MaskTex (“Mask (RGB) Trans (A)”, 2D) = “” { TexGen ObjectLinear }
}
SubShader
{
Pass
{
Blend SrcAlpha OneMinusSrcAlpha
SetTexture [_MainTex]
SetTexture [_MaskTex]
{
constantColor (1,1,1,[_Transp])
combine previous ,
texture* constant
Matrix [_Projector]
}
}
}
}

The shader does not work!Could you help me to modify it?