Skip to content

Commit

Permalink
ignoring meta; upgraded unity variables to 2017
Browse files Browse the repository at this point in the history
  • Loading branch information
Phunkyio committed Mar 9, 2019
1 parent 459860d commit 53c96b0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.meta
4 changes: 3 additions & 1 deletion phunky-shaders/burning-paper.shader
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'

//converted from shaderslab.com

Shader "Phunky/burning-paper"
Expand Down Expand Up @@ -29,7 +31,7 @@ Shader "Phunky/burning-paper"

v2f vert(appdata_base v) {
v2f o;
o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
o.pos = UnityObjectToClipPos(v.vertex);
o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
return o;
}
Expand Down
7 changes: 5 additions & 2 deletions phunky-shaders/echolocation.shader
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'

// converted from shaderslab.com
Shader "Phunky/echolocation" {
Properties {
Expand Down Expand Up @@ -25,8 +28,8 @@ Shader "Phunky/echolocation" {

v2f vert(appdata_base v) {
v2f o;
o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
o.worldPos = mul(_Object2World, v.vertex).xyz;
o.pos = UnityObjectToClipPos(v.vertex);
o.worldPos = mul(unity_ObjectToWorld, v.vertex).xyz;
return o;
}

Expand Down
4 changes: 3 additions & 1 deletion phunky-shaders/screenspace-texture.shader
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'

Shader "Phunky/screenspace-texture-unlit"
{
Properties
Expand Down Expand Up @@ -39,7 +41,7 @@ Shader "Phunky/screenspace-texture-unlit"

v2f vert(appdata v) {
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);
o.screenPos = o.vertex.xyw;
o.screenPos.y *= _ProjectionParams.x;

Expand Down

0 comments on commit 53c96b0

Please sign in to comment.