Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Assets/Shaders/Reflective/psx-unlit-add.shader
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Shader "psx/reflective/unlit-Add" {
Properties{
_MainTex("Base (RGB)", 2D) = "white" {}
_Cube("Cubemap", CUBE) = "" {}
_Cube("Cubemap", CUBE) = "" {}
_SnapPrecision("Snap Precision", Range (10,1000)) = 160
}
SubShader{
Tags{ "RenderType" = "Opaque" }
Expand All @@ -26,6 +27,7 @@
};

float4 _MainTex_ST;
uniform float _SnapPrecision;
uniform half4 unity_FogStart;
uniform half4 unity_FogEnd;

Expand All @@ -37,8 +39,8 @@
float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex);
float4 vertex = snapToPixel;
vertex.xyz = snapToPixel.xyz / snapToPixel.w;
vertex.x = floor(160 * vertex.x) / 160;
vertex.y = floor(120 * vertex.y) / 120;
vertex.x = floor(_SnapPrecision * vertex.x) / _SnapPrecision;
vertex.y = floor((_SnapPrecision * 0.75) * vertex.y) / (_SnapPrecision * 0.75);
vertex.xyz *= snapToPixel.w;
o.pos = vertex;

Expand Down
8 changes: 5 additions & 3 deletions Assets/Shaders/Reflective/psx-unlit-mult.shader
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Shader "psx/reflective/unlit-Mult" {
Properties{
_MainTex("Base (RGB)", 2D) = "white" {}
_Cube("Cubemap", CUBE) = "" {}
_Cube("Cubemap", CUBE) = "" {}
_SnapPrecision("Snap Precision", Range (10,1000)) = 160
}
SubShader{
Tags{ "RenderType" = "Opaque" }
Expand All @@ -26,6 +27,7 @@
};

float4 _MainTex_ST;
uniform float _SnapPrecision;
uniform half4 unity_FogStart;
uniform half4 unity_FogEnd;

Expand All @@ -37,8 +39,8 @@
float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex);
float4 vertex = snapToPixel;
vertex.xyz = snapToPixel.xyz / snapToPixel.w;
vertex.x = floor(160 * vertex.x) / 160;
vertex.y = floor(120 * vertex.y) / 120;
vertex.x = floor(_SnapPrecision * vertex.x) / _SnapPrecision;
vertex.y = floor((_SnapPrecision * 0.75) * vertex.y) / (_SnapPrecision * 0.75);
vertex.xyz *= snapToPixel.w;
o.pos = vertex;

Expand Down
6 changes: 4 additions & 2 deletions Assets/Shaders/Reflective/psx-unlit_noambient-add.shader
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Properties{
_MainTex("Base (RGB)", 2D) = "white" {}
_Cube("Cubemap", CUBE) = "" {}
_SnapPrecision("Snap Precision", Range (10,1000)) = 160
}
SubShader{
Tags{ "RenderType" = "Opaque" }
Expand All @@ -26,6 +27,7 @@
};

float4 _MainTex_ST;
uniform float _SnapPrecision;
uniform half4 unity_FogStart;
uniform half4 unity_FogEnd;

Expand All @@ -37,8 +39,8 @@
float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex);
float4 vertex = snapToPixel;
vertex.xyz = snapToPixel.xyz / snapToPixel.w;
vertex.x = floor(160 * vertex.x) / 160;
vertex.y = floor(120 * vertex.y) / 120;
vertex.x = floor(_SnapPrecision * vertex.x) / _SnapPrecision;
vertex.y = floor((_SnapPrecision * 0.75) * vertex.y) / (_SnapPrecision * 0.75);
vertex.xyz *= snapToPixel.w;
o.pos = vertex;

Expand Down
6 changes: 4 additions & 2 deletions Assets/Shaders/Reflective/psx-unlit_noambient-mult.shader
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Properties{
_MainTex("Base (RGB)", 2D) = "white" {}
_Cube("Cubemap", CUBE) = "" {}
_SnapPrecision("Snap Precision", Range (10,1000)) = 160
}
SubShader{
Tags{ "RenderType" = "Opaque" }
Expand All @@ -26,6 +27,7 @@
};

float4 _MainTex_ST;
uniform float _SnapPrecision;
uniform half4 unity_FogStart;
uniform half4 unity_FogEnd;

Expand All @@ -37,8 +39,8 @@
float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex);
float4 vertex = snapToPixel;
vertex.xyz = snapToPixel.xyz / snapToPixel.w;
vertex.x = floor(160 * vertex.x) / 160;
vertex.y = floor(120 * vertex.y) / 120;
vertex.x = floor(_SnapPrecision * vertex.x) / _SnapPrecision;
vertex.y = floor((_SnapPrecision * 0.75) * vertex.y) / (_SnapPrecision * 0.75);
vertex.xyz *= snapToPixel.w;
o.pos = vertex;

Expand Down
6 changes: 4 additions & 2 deletions Assets/Shaders/Reflective/psx-vertexlit-add.shader
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Properties{
_MainTex("Base (RGB)", 2D) = "white" {}
_Cube("Cubemap", CUBE) = "" {}
_SnapPrecision("Snap Precision", Range (10,1000)) = 160
}
SubShader{
Tags { "RenderType" = "Opaque" }
Expand All @@ -26,6 +27,7 @@
};

float4 _MainTex_ST;
uniform float _SnapPrecision;
uniform half4 unity_FogStart;
uniform half4 unity_FogEnd;

Expand All @@ -37,8 +39,8 @@
float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex);
float4 vertex = snapToPixel;
vertex.xyz = snapToPixel.xyz / snapToPixel.w;
vertex.x = floor(160 * vertex.x) / 160;
vertex.y = floor(120 * vertex.y) / 120;
vertex.x = floor(_SnapPrecision * vertex.x) / _SnapPrecision;
vertex.y = floor((_SnapPrecision * 0.75) * vertex.y) / (_SnapPrecision * 0.75);
vertex.xyz *= snapToPixel.w;
o.pos = vertex;

Expand Down
6 changes: 4 additions & 2 deletions Assets/Shaders/Reflective/psx-vertexlit-mult.shader
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Properties{
_MainTex("Base (RGB)", 2D) = "white" {}
_Cube("Cubemap", CUBE) = "" {}
_SnapPrecision("Snap Precision", Range (10,1000)) = 160
}
SubShader{
Tags { "RenderType" = "Opaque" }
Expand All @@ -26,6 +27,7 @@
};

float4 _MainTex_ST;
uniform float _SnapPrecision;
uniform half4 unity_FogStart;
uniform half4 unity_FogEnd;

Expand All @@ -37,8 +39,8 @@
float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex);
float4 vertex = snapToPixel;
vertex.xyz = snapToPixel.xyz / snapToPixel.w;
vertex.x = floor(160 * vertex.x) / 160;
vertex.y = floor(120 * vertex.y) / 120;
vertex.x = floor(_SnapPrecision * vertex.x) / _SnapPrecision;
vertex.y = floor((_SnapPrecision * 0.75) * vertex.y) / (_SnapPrecision * 0.75);
vertex.xyz *= snapToPixel.w;
o.pos = vertex;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Shader "psx/trasparent/unlit_noambient" {
Properties{
_MainTex("Base (RGB)", 2D) = "white" {}
_SnapPrecision("Snap Precision", Range (10,1000)) = 160
}
SubShader{
Tags{ "Queue" = "Transparent" "RenderType" = "Transparent" }
Expand All @@ -25,6 +26,7 @@
};

float4 _MainTex_ST;
uniform float _SnapPrecision;
uniform half4 unity_FogStart;
uniform half4 unity_FogEnd;

Expand All @@ -36,8 +38,8 @@
float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex);
float4 vertex = snapToPixel;
vertex.xyz = snapToPixel.xyz / snapToPixel.w;
vertex.x = floor(160 * vertex.x) / 160;
vertex.y = floor(120 * vertex.y) / 120;
vertex.x = floor(_SnapPrecision * vertex.x) / _SnapPrecision;
vertex.y = floor((_SnapPrecision * 0.75) * vertex.y) / (_SnapPrecision * 0.75);
vertex.xyz *= snapToPixel.w;
o.pos = vertex;

Expand Down
6 changes: 4 additions & 2 deletions Assets/Shaders/Trasparent/psx-trasparent-unlit.shader
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Shader "psx/trasparent/unlit" {
Properties{
_MainTex("Base (RGB)", 2D) = "white" {}
_SnapPrecision("Snap Precision", Range (10,1000)) = 160
}
SubShader{
Tags{ "Queue" = "Transparent" "RenderType" = "Transparent" }
Expand All @@ -25,6 +26,7 @@
};

float4 _MainTex_ST;
uniform float _SnapPrecision;
uniform half4 unity_FogStart;
uniform half4 unity_FogEnd;

Expand All @@ -36,8 +38,8 @@
float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex);
float4 vertex = snapToPixel;
vertex.xyz = snapToPixel.xyz / snapToPixel.w;
vertex.x = floor(160 * vertex.x) / 160;
vertex.y = floor(120 * vertex.y) / 120;
vertex.x = floor(_SnapPrecision * vertex.x) / _SnapPrecision;
vertex.y = floor((_SnapPrecision * 0.75) * vertex.y) / (_SnapPrecision * 0.75);
vertex.xyz *= snapToPixel.w;
o.pos = vertex;

Expand Down
6 changes: 4 additions & 2 deletions Assets/Shaders/Trasparent/psx-trasparent-vertexlit.shader
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Shader "psx/trasparent/vertexlit" {
Properties{
_MainTex("Base (RGB)", 2D) = "white" {}
_SnapPrecision("Snap Precision", Range (10,1000)) = 160
}
SubShader{
Tags{ "Queue" = "Transparent" "RenderType" = "Transparent" }
Expand All @@ -24,6 +25,7 @@
};

float4 _MainTex_ST;
uniform float _SnapPrecision;
uniform half4 unity_FogStart;
uniform half4 unity_FogEnd;

Expand All @@ -35,8 +37,8 @@
float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex);
float4 vertex = snapToPixel;
vertex.xyz = snapToPixel.xyz / snapToPixel.w;
vertex.x = floor(160 * vertex.x) / 160;
vertex.y = floor(120 * vertex.y) / 120;
vertex.x = floor(_SnapPrecision * vertex.x) / _SnapPrecision;
vertex.y = floor((_SnapPrecision * 0.75) * vertex.y) / (_SnapPrecision * 0.75);
vertex.xyz *= snapToPixel.w;
o.pos = vertex;

Expand Down
6 changes: 4 additions & 2 deletions Assets/Shaders/psx-unlit.shader
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Shader "psx/unlit" {
Properties{
_MainTex("Base (RGB)", 2D) = "white" {}
_SnapPrecision("Snap Precision", Range (10,1000)) = 160
}
SubShader{
Tags{ "RenderType" = "Opaque" }
Expand All @@ -24,6 +25,7 @@
};

float4 _MainTex_ST;
uniform float _SnapPrecision;
uniform half4 unity_FogStart;
uniform half4 unity_FogEnd;

Expand All @@ -35,8 +37,8 @@
float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex);
float4 vertex = snapToPixel;
vertex.xyz = snapToPixel.xyz / snapToPixel.w;
vertex.x = floor(160 * vertex.x) / 160;
vertex.y = floor(120 * vertex.y) / 120;
vertex.x = floor(_SnapPrecision * vertex.x) / _SnapPrecision;
vertex.y = floor((_SnapPrecision * 0.75) * vertex.y) / (_SnapPrecision * 0.75);
vertex.xyz *= snapToPixel.w;
o.pos = vertex;

Expand Down
6 changes: 4 additions & 2 deletions Assets/Shaders/psx-unlit_noambient.shader
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Shader "psx/unlit_noambient" {
Properties{
_MainTex("Base (RGB)", 2D) = "white" {}
_SnapPrecision("Snap Precision", Range (10,1000)) = 160
}
SubShader{
Tags{ "RenderType" = "Opaque" }
Expand All @@ -24,6 +25,7 @@
};

float4 _MainTex_ST;
uniform float _SnapPrecision;
uniform half4 unity_FogStart;
uniform half4 unity_FogEnd;

Expand All @@ -35,8 +37,8 @@
float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex);
float4 vertex = snapToPixel;
vertex.xyz = snapToPixel.xyz / snapToPixel.w;
vertex.x = floor(160 * vertex.x) / 160;
vertex.y = floor(120 * vertex.y) / 120;
vertex.x = floor(_SnapPrecision * vertex.x) / _SnapPrecision;
vertex.y = floor((_SnapPrecision * 0.75) * vertex.y) / (_SnapPrecision * 0.75);
vertex.xyz *= snapToPixel.w;
o.pos = vertex;

Expand Down
6 changes: 4 additions & 2 deletions Assets/Shaders/psx-vertexlit.shader
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Shader "psx/vertexlit" {
Properties{
_MainTex("Base (RGB)", 2D) = "white" {}
_SnapPrecision("Snap Precision", Range (10,1000)) = 160
}
SubShader{
Tags { "RenderType" = "Opaque" }
Expand All @@ -24,6 +25,7 @@
};

float4 _MainTex_ST;
uniform float _SnapPrecision;
uniform half4 unity_FogStart;
uniform half4 unity_FogEnd;

Expand All @@ -35,8 +37,8 @@
float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex);
float4 vertex = snapToPixel;
vertex.xyz = snapToPixel.xyz / snapToPixel.w;
vertex.x = floor(160 * vertex.x) / 160;
vertex.y = floor(120 * vertex.y) / 120;
vertex.x = floor(_SnapPrecision * vertex.x) / _SnapPrecision;
vertex.y = floor((_SnapPrecision * 0.75) * vertex.y) / (_SnapPrecision * 0.75);
vertex.xyz *= snapToPixel.w;
o.pos = vertex;

Expand Down