Added many other
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
Shader "Enviro/BumpedDiffuseOverlaySM2" {
|
||||
//
|
||||
// Tomasz Stobierski 2012
|
||||
//
|
||||
Properties {
|
||||
_Color ("Main Color", Color) = (1,1,1,1)
|
||||
_Opacity ("Color over opacity", Range (0, 1)) = 1
|
||||
_MainTex ("Color over (RGBA)", 2D) = "white" {}
|
||||
_BumpMap ("Normalmap over", 2D) = "bump" {}
|
||||
_MainTex2 ("Color under (RGBA)", 2D) = "white" {}
|
||||
_BumpMap2 ("Normalmap under", 2D) = "bump" {}
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 400
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf Lambert
|
||||
#pragma exclude_renderers flash
|
||||
|
||||
sampler2D _MainTex;
|
||||
sampler2D _BumpMap;
|
||||
sampler2D _MainTex2;
|
||||
sampler2D _BumpMap2;
|
||||
fixed4 _Color;
|
||||
float _Opacity;
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
float2 uv_BumpMap;
|
||||
float2 uv_MainTex2;
|
||||
float2 uv_BumpMap2;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
float4 tex = tex2D(_MainTex, IN.uv_MainTex);
|
||||
float4 tex2 = tex2D(_MainTex2, IN.uv_MainTex2);
|
||||
float4 dest;
|
||||
_Opacity*=tex.a;
|
||||
dest.rgb = tex2.rgb<=0.5 ? 2*tex.rgb*tex2.rgb : 1-2*(1-tex.rgb)*(1-tex2.rgb);
|
||||
dest.rgb = lerp(tex2.rgb, dest.rgb, _Opacity);
|
||||
dest.rgb *= _Color.rgb;
|
||||
o.Albedo = dest.rgb;
|
||||
o.Alpha = tex2.a * _Color.a;
|
||||
|
||||
float4 norm = tex2D(_BumpMap, IN.uv_BumpMap);
|
||||
float4 norm2 = tex2D(_BumpMap2, IN.uv_BumpMap2);
|
||||
dest = norm2<=0.5 ? 2*norm*norm2 : 1-2*(1-norm)*(1-norm2);
|
||||
dest = lerp(norm2, dest, _Opacity);
|
||||
o.Normal = UnpackNormal(dest);
|
||||
}
|
||||
ENDCG
|
||||
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 400
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf Lambert
|
||||
#pragma only_renderers flash
|
||||
|
||||
sampler2D _MainTex;
|
||||
sampler2D _MainTex2;
|
||||
fixed4 _Color;
|
||||
float _Opacity;
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
float2 uv_MainTex2;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
float4 tex = tex2D(_MainTex, IN.uv_MainTex);
|
||||
float4 tex2 = tex2D(_MainTex2, IN.uv_MainTex2);
|
||||
float4 dest;
|
||||
_Opacity*=tex.a;
|
||||
dest.rgb = tex2.rgb<=0.5 ? 2*tex.rgb*tex2.rgb : 1-2*(1-tex.rgb)*(1-tex2.rgb);
|
||||
dest.rgb = lerp(tex2.rgb, dest.rgb, _Opacity);
|
||||
dest.rgb *= _Color.rgb;
|
||||
o.Albedo = dest.rgb;
|
||||
o.Alpha = tex2.a * _Color.a;
|
||||
}
|
||||
ENDCG
|
||||
|
||||
}
|
||||
|
||||
FallBack "Bumped Diffuse"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 215b9e3f569971a4f9925317d037e62e
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 6947
|
||||
packageName: Rock and Boulders 2
|
||||
packageVersion: 1.2
|
||||
assetPath: Assets/Rocks and Boulders 2/Shaders/Blend SM2.shader
|
||||
uploadId: 228760
|
||||
@@ -0,0 +1,58 @@
|
||||
Shader "Enviro/BumpedDiffuseOverlaySM3" {
|
||||
//
|
||||
// Tomasz Stobierski 2012
|
||||
//
|
||||
Properties {
|
||||
_Color ("Main Color", Color) = (1,1,1,1)
|
||||
_Opacity ("Color over opacity", Range (0, 1)) = 1
|
||||
_MainTex ("Color over (RGBA)", 2D) = "white" {}
|
||||
_BumpMap ("Normalmap over", 2D) = "bump" {}
|
||||
_MainTex2 ("Color under (RGBA)", 2D) = "white" {}
|
||||
_BumpMap2 ("Normalmap under", 2D) = "bump" {}
|
||||
}
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 400
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf Lambert
|
||||
#pragma target 3.0
|
||||
|
||||
sampler2D _MainTex;
|
||||
sampler2D _BumpMap;
|
||||
sampler2D _MainTex2;
|
||||
sampler2D _BumpMap2;
|
||||
fixed4 _Color;
|
||||
float _Opacity;
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
float2 uv_BumpMap;
|
||||
float2 uv_MainTex2;
|
||||
float2 uv_BumpMap2;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
float4 tex = tex2D(_MainTex, IN.uv_MainTex);
|
||||
float4 tex2 = tex2D(_MainTex2, IN.uv_MainTex2);
|
||||
float4 dest;
|
||||
_Opacity*=tex.a;
|
||||
dest.rgb = tex2.rgb<=0.5 ? 2*tex.rgb*tex2.rgb : 1-2*(1-tex.rgb)*(1-tex2.rgb);
|
||||
dest.rgb = lerp(tex2.rgb, dest.rgb, _Opacity);
|
||||
dest.rgb *= _Color.rgb;
|
||||
o.Albedo = dest.rgb;
|
||||
o.Alpha = tex2.a * _Color.a;
|
||||
|
||||
float4 norm = tex2D(_BumpMap, IN.uv_BumpMap);
|
||||
float4 norm2 = tex2D(_BumpMap2, IN.uv_BumpMap2);
|
||||
dest = norm2<=0.5 ? 2*norm*norm2 : 1-2*(1-norm)*(1-norm2);
|
||||
dest = lerp(norm2, dest, _Opacity);
|
||||
o.Normal = UnpackNormal(dest);
|
||||
}
|
||||
ENDCG
|
||||
|
||||
}
|
||||
|
||||
FallBack "Bumped Diffuse"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d67ad3fcf65693f4fb110205f1fe4a0e
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 6947
|
||||
packageName: Rock and Boulders 2
|
||||
packageVersion: 1.2
|
||||
assetPath: Assets/Rocks and Boulders 2/Shaders/Blend SM3.shader
|
||||
uploadId: 228760
|
||||
@@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class RotateGameObject : MonoBehaviour {
|
||||
public float rot_speed_x=0;
|
||||
public float rot_speed_y=0;
|
||||
public float rot_speed_z=0;
|
||||
public bool local=false;
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void FixedUpdate () {
|
||||
if (local) {
|
||||
transform.RotateAroundLocal(transform.up, Time.fixedDeltaTime*rot_speed_x);
|
||||
} else {
|
||||
transform.Rotate(Time.fixedDeltaTime*new Vector3(rot_speed_x,rot_speed_y,rot_speed_z), Space.World);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8922ed451d14d75478d2565754f0c719
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 6947
|
||||
packageName: Rock and Boulders 2
|
||||
packageVersion: 1.2
|
||||
assetPath: Assets/Rocks and Boulders 2/Shaders/RotateGameObject.cs
|
||||
uploadId: 228760
|
||||
@@ -0,0 +1,6 @@
|
||||
Free desaturate image effect by SixTimesNothing
|
||||
|
||||
Blend SM2 and Blend SM3 shader by Tomasz Stobierski aka tomaszek (use only with assets in this package)
|
||||
|
||||
package looks better with Relief shaders:
|
||||
http://u3d.as/content/tomasz-stobierski/rtp-relief-terrain-pack/3Jy
|
||||
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 581f9521eda4ace4c8e126edbc349d92
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 6947
|
||||
packageName: Rock and Boulders 2
|
||||
packageVersion: 1.2
|
||||
assetPath: Assets/Rocks and Boulders 2/Shaders/shader info.txt
|
||||
uploadId: 228760
|
||||
Reference in New Issue
Block a user