Skip to content

Commit

Permalink
HLS2GLSLConverter: enabled SV_Coverage support
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Dec 31, 2024
1 parent 969e7ed commit 977d540
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Graphics/HLSL2GLSLConverterLib/include/GLSLDefinitions.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2024 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -1195,6 +1195,7 @@ out gl_PerVertex
// SV_Position.w == w, while gl_FragCoord.w == 1/w
#define _GET_GL_FRAG_COORD(FragCoord)_ResizeVector(FragCoord, vec4(gl_FragCoord.xyz, 1.0/gl_FragCoord.w))
#define _GET_GL_FRONT_FACING(FrontFacing)_TypeConvertStore(FrontFacing, gl_FrontFacing)
#define _GET_GL_SAMPLE_MASK_IN(SampleMaskIn)_TypeConvertStore(SampleMaskIn, gl_SampleMaskIn[0])
#define _SET_GL_FRAG_DEPTH(Depth)_TypeConvertStore(gl_FragDepth, Depth)

#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ HLSL2GLSLConverterImpl::HLSL2GLSLConverterImpl()

DEFINE_VARIABLE(PSInd, InVar, "sv_position", "_GET_GL_FRAG_COORD");
DEFINE_VARIABLE(PSInd, InVar, "sv_isfrontface", "_GET_GL_FRONT_FACING");
DEFINE_VARIABLE(PSInd, InVar, "sv_coverage", "_GET_GL_SAMPLE_MASK_IN");
DEFINE_VARIABLE(PSInd, OutVar, "sv_depth", "_SET_GL_FRAG_DEPTH");

DEFINE_VARIABLE(CSInd, InVar, "sv_dispatchthreadid", "_GET_GL_GLOBAL_INVOCATION_ID");
Expand Down

0 comments on commit 977d540

Please sign in to comment.