Use compiler-portable geometry shader includes
This commit is contained in:
parent
9758940b35
commit
cdeea47454
3 changed files with 8 additions and 8 deletions
|
|
@ -1,11 +1,11 @@
|
|||
#ifndef GAMECULT_GEOMETRY_HLSL
|
||||
#define GAMECULT_GEOMETRY_HLSL
|
||||
|
||||
#ifndef GAMECULT_GEOMETRY_CULTMATH_INCLUDE
|
||||
#define GAMECULT_GEOMETRY_CULTMATH_INCLUDE "CultMath.hlsl"
|
||||
#if defined(GAMECULT_GEOMETRY_UNITY_PACKAGE)
|
||||
#include "Packages/org.gamecult.cultmath/shaders/CultMath.hlsl"
|
||||
#else
|
||||
#include "CultMath/CultMath.hlsl"
|
||||
#endif
|
||||
|
||||
#include GAMECULT_GEOMETRY_CULTMATH_INCLUDE
|
||||
#include "AdvancedErosionFilter.hlsl"
|
||||
#include "Planetary.hlsl"
|
||||
#include "SphericalErosion.hlsl"
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ public sealed class GeometryShaderOwnershipTests
|
|||
var spherical = File.ReadAllText(Path.Combine(shaders, "SphericalErosion.hlsl"));
|
||||
var refinement = File.ReadAllText(Path.Combine(shaders, "PlanetaryRadialRefinement.hlsl"));
|
||||
|
||||
Assert.That(umbrella, Does.Contain("#define GAMECULT_GEOMETRY_CULTMATH_INCLUDE \"CultMath.hlsl\"")
|
||||
.And.Contain("#include GAMECULT_GEOMETRY_CULTMATH_INCLUDE")
|
||||
Assert.That(umbrella, Does.Contain("#include \"CultMath/CultMath.hlsl\"")
|
||||
.And.Contain("#include \"Packages/org.gamecult.cultmath/shaders/CultMath.hlsl\"")
|
||||
.And.Contain("#include \"AdvancedErosionFilter.hlsl\"")
|
||||
.And.Contain("#include \"Planetary.hlsl\"")
|
||||
.And.Contain("#include \"SphericalErosion.hlsl\"")
|
||||
|
|
@ -54,7 +54,7 @@ public sealed class GeometryShaderOwnershipTests
|
|||
"GameCultGeometryPlanetaryViewer.shader"));
|
||||
|
||||
Assert.That(shader, Does.Contain(
|
||||
"#define GAMECULT_GEOMETRY_CULTMATH_INCLUDE \"Packages/org.gamecult.cultmath/shaders/CultMath.hlsl\"")
|
||||
"#define GAMECULT_GEOMETRY_UNITY_PACKAGE 1")
|
||||
.And.Contain("#include \"Packages/org.gamecult.geometry/Shaders/GameCult.Geometry.hlsl\"")
|
||||
.And.Contain("gamecult_geometry_planetary_field_sample")
|
||||
.And.Not.Contain("cultmath_planetary_")
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Shader "GameCult.Geometry/Planetary Field Viewer"
|
|||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#include "UnityCG.cginc"
|
||||
#define GAMECULT_GEOMETRY_CULTMATH_INCLUDE "Packages/org.gamecult.cultmath/shaders/CultMath.hlsl"
|
||||
#define GAMECULT_GEOMETRY_UNITY_PACKAGE 1
|
||||
#include "Packages/org.gamecult.geometry/Shaders/GameCult.Geometry.hlsl"
|
||||
|
||||
float _Radius;
|
||||
|
|
|
|||
Loading…
Reference in a new issue