Skip to content

Commit

Permalink
Merge pull request #39 from Delt06/reflection-probes
Browse files Browse the repository at this point in the history
Reflection probes
  • Loading branch information
Delt06 authored Apr 25, 2022
2 parents 4390253 + 8db4789 commit 241e03e
Show file tree
Hide file tree
Showing 38 changed files with 2,627 additions and 41 deletions.
8 changes: 8 additions & 0 deletions Assets/Graphics/Materials/Reflections.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

164 changes: 164 additions & 0 deletions Assets/Graphics/Materials/Reflections/Fully Reflective.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-9117855501249280073
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 5
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Fully Reflective
m_Shader: {fileID: 4800000, guid: 849dc4ff793a3f943ad21a3b6ee26456, type: 3}
m_ValidKeywords:
- _ADDITIONAL_LIGHTS_ENABLED
- _ENVIRONMENT_LIGHTING_ENABLED
- _FOG
- _RAMP_TRIPLE
- _REFLECTIONS
- _REFLECTION_PROBES
m_InvalidKeywords:
- _ZWRITE_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _RampMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AdditionalLights: 1
- _AdditionalLightsSpecular: 0
- _AlphaClip: 0
- _AnisoSpecular: 0
- _Blend: 0
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _Emission: 0
- _EnvironmentLightingEnabled: 1
- _EnvironmentReflections: 1
- _Fog: 1
- _Fresnel: 0
- _FresnelSmoothness: 0.1
- _FresnelThickness: 0.45
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _PureShadowColor: 0
- _QueueOffset: 0
- _Ramp0: 0
- _Ramp1: 0.5
- _RampSmoothness: 0.005
- _RampTriple: 1
- _ReceiveShadows: 1
- _ReflectionBlend: 1
- _ReflectionProbes: 1
- _ReflectionSmoothness: 1
- _Reflections: 1
- _ShadowMask: 0
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _Specular: 0
- _SpecularExponent: 200
- _SpecularHighlights: 1
- _SpecularSmoothness: 0.025
- _SpecularThreshold: 0.8
- _SrcBlend: 1
- _Surface: 0
- _UseRampMap: 0
- _VertexColor: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _FresnelColor: {r: 1.3041189, g: 1.3041189, b: 1.3041189, a: 1}
- _ShadowTint: {r: 0, g: 0, b: 0, a: 0.5529412}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
- _SpecularColor: {r: 0.9221513, g: 0.9221513, b: 0.9221513, a: 1}
m_BuildTextureStacks: []

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

168 changes: 168 additions & 0 deletions Assets/Graphics/Materials/Reflections/Partially Reflective.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-9117855501249280073
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 5
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Partially Reflective
m_Shader: {fileID: 4800000, guid: 849dc4ff793a3f943ad21a3b6ee26456, type: 3}
m_ValidKeywords:
- _ADDITIONAL_LIGHTS_ENABLED
- _EMISSION
- _ENVIRONMENT_LIGHTING_ENABLED
- _FOG
- _FRESNEL
- _NORMALMAP
- _RAMP_TRIPLE
- _REFLECTIONS
- _REFLECTION_PROBES
- _SPECULAR
m_InvalidKeywords:
- _ZWRITE_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 2800000, guid: 63433567109f5ae41a49a6e9f420cba7, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 2800000, guid: 8f1bd7bdb6d15e34eaa6867395cb1090, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _RampMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AdditionalLights: 1
- _AdditionalLightsSpecular: 0
- _AlphaClip: 0
- _AnisoSpecular: 0
- _Blend: 0
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _Emission: 1
- _EnvironmentLightingEnabled: 1
- _EnvironmentReflections: 1
- _Fog: 1
- _Fresnel: 1
- _FresnelSmoothness: 0.79
- _FresnelThickness: 0.479
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _PureShadowColor: 0
- _QueueOffset: 0
- _Ramp0: 0.267
- _Ramp1: 0.605
- _RampSmoothness: 0.102
- _RampTriple: 1
- _ReceiveShadows: 1
- _ReflectionBlend: 0.767
- _ReflectionProbes: 1
- _ReflectionSmoothness: 0.667
- _Reflections: 1
- _ShadowMask: 0
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _Specular: 1
- _SpecularExponent: 12
- _SpecularHighlights: 1
- _SpecularSmoothness: 0.501
- _SpecularThreshold: 0.86
- _SrcBlend: 1
- _Surface: 0
- _UseRampMap: 0
- _VertexColor: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0.029018352, g: 0.029018352, b: 0.029018352, a: 1}
- _FresnelColor: {r: 0.07058824, g: 0.07058824, b: 0.07058824, a: 1}
- _ShadowTint: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
- _SpecularColor: {r: 0.070911504, g: 0.070911504, b: 0.070911504, a: 1}
m_BuildTextureStacks: []

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Assets/Graphics/Shaders/ToonShaderCustomInstanced.shader
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ Shader "DELTation/Toon Shader Custom Instanced"

// Editmode props
[HideInInspector] _QueueOffset("Queue Offset", Float) = 0.0

[Toggle(_REFLECTIONS)] _Reflections("Reflections", Float) = 0.0
[Toggle(_REFLECTION_PROBES)] _ReflectionProbes("Reflection Probes", Float) = 0.0
_ReflectionSmoothness ("Smoothness", Range(0, 1)) = 0.5
_ReflectionBlend ("Blend", Range(0, 1)) = 0.5

}
SubShader
Expand Down Expand Up @@ -107,6 +112,9 @@ Shader "DELTation/Toon Shader Custom Instanced"
#pragma shader_feature_local_fragment _ALPHATEST_ON
#pragma shader_feature_local_fragment _ALPHAPREMULTIPLY_ON

#pragma shader_feature_local_fragment _REFLECTIONS
#pragma shader_feature_local_fragment _REFLECTION_PROBES

#pragma multi_compile _ _MAIN_LIGHT_SHADOWS
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE
#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
Expand All @@ -115,6 +123,8 @@ Shader "DELTation/Toon Shader Custom Instanced"
#pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION
#pragma multi_compile _ LIGHTMAP_SHADOW_MIXING
#pragma multi_compile _ SHADOWS_SHADOWMASK
#pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING
#pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION


// Unity
Expand Down
Loading

0 comments on commit 241e03e

Please sign in to comment.