Skip to content

Fix blend modes and separate preserve specular #1848

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
df48573
Remove _ALPHAPREMULTIPLY_ON from shaders.
eh-unity Sep 3, 2020
b113d42
Add blend-mode test case.
eh-unity Sep 3, 2020
dee7300
Revert "Remove _ALPHAPREMULTIPLY_ON from shaders."
eh-unity Sep 8, 2020
84e9c95
More work on fixing premultiplied blend and separating preserve specu…
eh-unity Sep 9, 2020
ba1937a
Move move/duplicate PassMesh.template for Universal.
eh-unity Sep 10, 2020
a7af75c
Match other shaders with Lit.
eh-unity Sep 10, 2020
ce17970
Add metallic reflective spheres as a test case.
eh-unity Sep 10, 2020
c186c5d
Add test case to build options.
eh-unity Sep 10, 2020
2d8fbd4
Fix test cases.
eh-unity Sep 11, 2020
a48bf25
Fix multiply mode and finish blending test.
eh-unity Sep 11, 2020
67ddc06
Merge branch 'master' into universal/fix-premultiplied-alpha
eh-unity Sep 11, 2020
8f876cb
Fix blending test and update ref.
eh-unity Sep 11, 2020
68aa8d4
Fix minor issues.
eh-unity Oct 9, 2020
cfaf31d
Merge branch 'master' into universal/fix-premultiplied-alpha
eh-unity Oct 9, 2020
defe075
Test code for branched logic instead of variants.
eh-unity Oct 12, 2020
7e4d72e
Merge branch 'master' into universal/fix-premultiplied-alpha
eh-unity Oct 12, 2020
85eea47
Merge branch 'master' into universal/fix-premultiplied-alpha
eh-unity Nov 6, 2020
4214b99
Merge branch 'master' into universal/fix-premultiplied-alpha
eh-unity Nov 20, 2020
da69989
Refactor
eh-unity Nov 20, 2020
d831110
Fix incorrect merge.
eh-unity Nov 20, 2020
7dae456
Merge branch 'master' into universal/fix-premultiplied-alpha
eh-unity Mar 2, 2021
d2f1d85
Move blending test into new test project.
eh-unity Mar 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Material:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3050
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses:
Expand Down Expand Up @@ -79,11 +79,13 @@ Material:
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _DstBlendA: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossinessSource: 0
- _GlossyReflections: 1
- _Parallax: 0.02
- _PreserveSpecular: 0
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Shininess: 0.5
Expand All @@ -93,6 +95,7 @@ Material:
- _SpecSource: 0
- _SpecularHighlights: 0
- _SrcBlend: 5
- _SrcBlendA: 1
- _Surface: 1
- _UVSec: 0
- _ZWrite: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Material:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3050
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses:
Expand Down Expand Up @@ -91,21 +91,25 @@ Material:
- _ClearCoatMask: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _DstBlendA: 10
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _PreserveSpecular: 0
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 5
- _SrcBlendA: 1
- _Surface: 1
- _UVSec: 0
- _WorkflowMode: 1
Expand Down

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

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

Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ Material:
m_PrefabAsset: {fileID: 0}
m_Name: mahogfloor-pbs
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _METALLICSPECGLOSSMAP _NORMALMAP _OCCLUSIONMAP
m_ShaderKeywords: _METALLICSPECGLOSSMAP _NORMALMAP _OCCLUSIONMAP _PRESERVE_SPECULAR
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3050
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses:
Expand All @@ -46,6 +46,18 @@ Material:
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}
Expand All @@ -62,32 +74,42 @@ Material:
m_Texture: {fileID: 2800000, guid: 2341b4855a0f34cb992c4af4526d0650, type: 3}
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}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _Blend: 1
- _Blend: 0
- _BumpScale: 1
- _ClearCoat: 0
- _ClearCoatMask: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _DstBlendA: 10
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _PreserveSpecular: 1
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 1
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendA: 1
- _Surface: 1
- _WorkflowMode: 1
- _ZWrite: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ Material:
m_PrefabAsset: {fileID: 0}
m_Name: plasticpattern-pbs
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _METALLICSPECGLOSSMAP _NORMALMAP _OCCLUSIONMAP
m_ShaderKeywords: _METALLICSPECGLOSSMAP _NORMALMAP _OCCLUSIONMAP _PRESERVE_SPECULAR
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3050
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses:
Expand All @@ -46,13 +46,25 @@ Material:
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: 2800000, guid: 4c142979bdafe4d44acb1c2d189c4612, type: 3}
m_Scale: {x: 1, y: 1}
m_Scale: {x: 2, y: 2}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 2800000, guid: ab9338f8b5d814e8a84e78f5a07b3ddc, type: 3}
Expand All @@ -62,32 +74,42 @@ Material:
m_Texture: {fileID: 2800000, guid: baabe099827ed4bd78434953866db35b, type: 3}
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}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _Blend: 1
- _Blend: 0
- _BumpScale: 1
- _ClearCoat: 0
- _ClearCoatMask: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _DstBlendA: 10
- _EnvironmentReflections: 1
- _GlossMapScale: 0.98
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _PreserveSpecular: 1
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 1
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendA: 1
- _Surface: 1
- _WorkflowMode: 1
- _ZWrite: 0
Expand Down

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

Loading