Skip to content
This repository was archived by the owner on Jun 17, 2025. It is now read-only.

Commit 1abd5cf

Browse files
authored
Merge pull request #7 from Netherlands3D/feature/supporting-receive-shadows-tile-shader
shadow casting pass for the tiles3d shader
2 parents b5e8695 + 8fde061 commit 1abd5cf

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [5.0.7] - 2025-05-20
8+
This release is part of the Netherlands3D fork.
9+
### Added
10+
-added a shadow pass to the tiles3d shader to also be able to cast shadows
11+
712
## [5.0.6] - 2025-05-16
813
This release is part of the Netherlands3D fork.
914
### Fixed

Runtime/Shader/Tiles3D.shader

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,45 @@
9090
}
9191
ENDHLSL
9292
}
93+
Pass
94+
{
95+
Name "ShadowCaster"
96+
Tags { "LightMode" = "ShadowCaster" }
97+
98+
HLSLPROGRAM
99+
#pragma vertex vert
100+
#pragma fragment frag
101+
102+
#pragma multi_compile_instancing
103+
104+
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
105+
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShadowCasterPass.hlsl"
106+
107+
struct Attributes
108+
{
109+
float4 vertex : POSITION;
110+
float3 normal : NORMAL;
111+
};
112+
113+
struct Varyings
114+
{
115+
float4 positionCS : SV_POSITION;
116+
};
117+
118+
Varyings vert(Attributes input)
119+
{
120+
Varyings output;
121+
float3 positionWS = TransformObjectToWorld(input.vertex.xyz);
122+
float3 normalWS = TransformObjectToWorldNormal(input.normal);
123+
output.positionCS = GetShadowCasterPositionCS(input.vertex, normalWS);
124+
return output;
125+
}
126+
127+
float4 frag(Varyings input) : SV_Target
128+
{
129+
return 0;
130+
}
131+
ENDHLSL
132+
}
93133
}
94134
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eu.netherlands3d.gltfast",
3-
"version": "5.0.6",
3+
"version": "5.0.7",
44
"displayName": "glTFast [Netherlands3D]",
55
"description": "[Netherlands3D fork] Use glTFast to import and export glTF 3D files efficiently at runtime or in the Editor",
66
"unity": "2019.4",

0 commit comments

Comments
 (0)