Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Duttenheim committed Aug 12, 2024
1 parent 58d586b commit a716c75
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion code/render/coregraphics/pass.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void DestroyPass(const PassId id);
/// called when window is resized
void PassWindowResizeCallback(const PassId id);
/// Set viewports
void PassSetRenderTargetDimensions(const PassId id, const Util::FixedArray<Shared::RenderTargetParameters>& viewports);
void PassSetRenderTargetParameters(const PassId id, const Util::FixedArray<Shared::RenderTargetParameters>& viewports);

/// get number of color attachments for entire pass (attachment list)
const Util::Array<CoreGraphics::TextureViewId>& PassGetAttachments(const CoreGraphics::PassId id);
Expand Down
2 changes: 1 addition & 1 deletion code/render/coregraphics/vk/vkpass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ PassWindowResizeCallback(const PassId id)
/**
*/
void
PassSetRenderTargetDimensions(const PassId id, const Util::FixedArray<Shared::RenderTargetParameters>& viewports)
PassSetRenderTargetParameters(const PassId id, const Util::FixedArray<Shared::RenderTargetParameters>& viewports)
{
VkPassRuntimeInfo& runtimeInfo = passAllocator.Get<Pass_VkRuntimeInfo>(id.id);
BufferUpdateArray(runtimeInfo.passBlockBuffer, viewports.Begin(), viewports.Size(), runtimeInfo.renderTargetDimensionsVar);
Expand Down
2 changes: 1 addition & 1 deletion code/render/terrain/shaders/terrain.fx
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ TessellationFactorScreenSpace(vec4 p0, vec4 p1)
mat4 mvp = Transform * ViewProjection;
vec4 p0Proj = mvp * p0;
vec4 p1Proj = mvp * p1;
float screen = max(RenderTargetDimensions[0].x, RenderTargetDimensions[0].y);
float screen = max(RenderTargetParameter[0].Dimensionsx, RenderTargetParameter[0].Dimensions.y);
float dist = distance(p0Proj.xy / p0Proj.w, p1Proj.xy / p1Proj.w);
return clamp(dist * screen, MinTessellation, MaxTessellation);
*/
Expand Down
2 changes: 1 addition & 1 deletion fips-files/generators/framescriptc.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ def FormatSource(self, file):

for attachment in self.attachments:
file.WriteLine('Pass_{}_RenderTargetDimensions[Pass_{}_Attachment_{}] = Shared::RenderTargetParameters{{ {{ viewport.width() * {}f, viewport.height() * {}f, 1 / float(viewport.width()) * {}f, 1 / float(viewport.height()) * {}f }}, {{ viewport.width() / TextureDimensions[(uint)TextureIndex::{}].first, viewport.height() / TextureDimensions[(uint)TextureIndex::{}].second }} }};'.format(self.name, self.name, attachment.name, attachment.ref.relativeSize[0], attachment.ref.relativeSize[1], attachment.ref.relativeSize[0], attachment.ref.relativeSize[1], attachment.ref.name, attachment.ref.name))
file.WriteLine('CoreGraphics::PassSetRenderTargetDimensions(Pass_{}, Pass_{}_RenderTargetDimensions);'.format(self.name, self.name))
file.WriteLine('CoreGraphics::PassSetRenderTargetParameters(Pass_{}, Pass_{}_RenderTargetDimensions);'.format(self.name, self.name))
file.WriteLine('CoreGraphics::CmdBeginPass(cmdBuf, Pass_{});'.format(self.name))

for subpass in self.subpasses:
Expand Down
10 changes: 5 additions & 5 deletions syswork/shaders/vk/lib/geometrybase.fxh
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ shader
void
psDepthOnly()
{
vec2 seed = gl_FragCoord.xy * RenderTargetDimensions[0].zw;
vec2 seed = gl_FragCoord.xy * RenderTargetParameter[0].Dimensions.zw;
float dither = hash12(seed);
if (dither < DitherFactor)
discard;
Expand All @@ -301,7 +301,7 @@ shader
void
psDepthOnlyAlphaMask(in vec2 UV)
{
vec2 seed = gl_FragCoord.xy * RenderTargetDimensions[0].zw;
vec2 seed = gl_FragCoord.xy * RenderTargetParameter[0].Dimensions.zw;
float dither = hash12(seed);
if (dither < DitherFactor)
discard;
Expand Down Expand Up @@ -592,7 +592,7 @@ psUberAlphaTest(
[color2] out vec4 Material
)
{
vec2 seed = gl_FragCoord.xy * RenderTargetDimensions[0].zw;
vec2 seed = gl_FragCoord.xy * RenderTargetParameter[0].Dimensions.zw;
vec3 rnd = vec3(hash12(seed) + hash12(seed + 0.59374) - 0.5);
float dither = (rnd.z + rnd.x + rnd.y) * DitherFactor;
if (dither > 1.0f)
Expand Down Expand Up @@ -627,7 +627,7 @@ psUberVertexColor(
[color2] out vec4 Material
)
{
vec2 seed = gl_FragCoord.xy * RenderTargetDimensions[0].zw;
vec2 seed = gl_FragCoord.xy * RenderTargetParameter[0].Dimensions.zw;
vec3 rnd = vec3(hash12(seed) + hash12(seed + 0.59374) - 0.5);
float dither = (rnd.z + rnd.x + rnd.y) * DitherFactor;
if (dither > 1.0f)
Expand Down Expand Up @@ -658,7 +658,7 @@ psUberAlpha(in vec3 ViewSpacePos,
[color2] out vec4 Material
)
{
vec2 seed = gl_FragCoord.xy * RenderTargetDimensions[0].zw;
vec2 seed = gl_FragCoord.xy * RenderTargetParameter[0].Dimensions.zw;
vec3 rnd = vec3(hash12(seed) + hash12(seed + 0.59374) - 0.5);
float dither = (rnd.z + rnd.x + rnd.y) * DitherFactor;
if (dither > 1.0f)
Expand Down
8 changes: 4 additions & 4 deletions syswork/shaders/vk/particle.fx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ psUnlit(in vec4 ViewSpacePosition,
in vec2 UV,
[color0] out vec4 FinalColor)
{
vec2 pixelSize = RenderTargetDimensions[0].zw;
vec2 pixelSize = RenderTargetParameter[0].Dimensions.zw;
vec2 screenUV = PixelToNormalized(gl_FragCoord.xy, pixelSize.xy);
vec4 diffColor = sample2D(_Unlit.AlbedoMap, ParticleSampler, UV);

Expand All @@ -185,7 +185,7 @@ psUnlit2Layers(in vec4 ViewSpacePosition,
in vec2 UV,
[color0] out vec4 FinalColor)
{
vec2 pixelSize = RenderTargetDimensions[0].zw;
vec2 pixelSize = RenderTargetParameter[0].Dimensions.zw;
vec2 screenUV = PixelToNormalized(gl_FragCoord.xy, pixelSize.xy);
vec4 layer1 = sample2D(_BlendAdd.AlbedoMap, LayerSampler, UV + _BlendAdd.UVAnim1 * Time_Random_Luminance_X.x);
vec4 layer2 = sample2D(_BlendAdd.Layer2, LayerSampler, UV + _BlendAdd.UVAnim2 * Time_Random_Luminance_X.x);
Expand All @@ -209,7 +209,7 @@ psUnlit3Layers(in vec4 ViewSpacePosition,
in vec2 UV,
[color0] out vec4 FinalColor)
{
vec2 pixelSize = RenderTargetDimensions[0].zw;
vec2 pixelSize = RenderTargetParameter[0].Dimensions.zw;
vec2 screenUV = PixelToNormalized(gl_FragCoord.xy, pixelSize.xy);
vec4 layer1 = sample2D(_BlendAdd.AlbedoMap, LayerSampler, UV + _BlendAdd.UVAnim1 * Time_Random_Luminance_X.x);
vec4 layer2 = sample2D(_BlendAdd.Layer2, LayerSampler, UV + _BlendAdd.UVAnim2 * Time_Random_Luminance_X.x);
Expand All @@ -234,7 +234,7 @@ psUnlit4Layers(in vec4 ViewSpacePosition,
in vec2 UV,
[color0] out vec4 FinalColor)
{
vec2 pixelSize = RenderTargetDimensions[0].zw;
vec2 pixelSize = RenderTargetParameter[0].Dimensions.zw;
vec2 screenUV = PixelToNormalized(gl_FragCoord.xy, pixelSize.xy);
vec4 layer1 = sample2D(_BlendAdd.AlbedoMap, LayerSampler, UV + _BlendAdd.UVAnim1 * Time_Random_Luminance_X.x);
vec4 layer2 = sample2D(_BlendAdd.Layer2, LayerSampler, UV + _BlendAdd.UVAnim2 * Time_Random_Luminance_X.x);
Expand Down

0 comments on commit a716c75

Please sign in to comment.