Skip to content

Commit 977d540

Browse files
HLS2GLSLConverter: enabled SV_Coverage support
1 parent 969e7ed commit 977d540

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Graphics/HLSL2GLSLConverterLib/include/GLSLDefinitions.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2022 Diligent Graphics LLC
2+
* Copyright 2019-2024 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -1195,6 +1195,7 @@ out gl_PerVertex
11951195
// SV_Position.w == w, while gl_FragCoord.w == 1/w
11961196
#define _GET_GL_FRAG_COORD(FragCoord)_ResizeVector(FragCoord, vec4(gl_FragCoord.xyz, 1.0/gl_FragCoord.w))
11971197
#define _GET_GL_FRONT_FACING(FrontFacing)_TypeConvertStore(FrontFacing, gl_FrontFacing)
1198+
#define _GET_GL_SAMPLE_MASK_IN(SampleMaskIn)_TypeConvertStore(SampleMaskIn, gl_SampleMaskIn[0])
11981199
#define _SET_GL_FRAG_DEPTH(Depth)_TypeConvertStore(gl_FragDepth, Depth)
11991200

12001201
#endif

Graphics/HLSL2GLSLConverterLib/src/HLSL2GLSLConverterImpl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ HLSL2GLSLConverterImpl::HLSL2GLSLConverterImpl()
649649

650650
DEFINE_VARIABLE(PSInd, InVar, "sv_position", "_GET_GL_FRAG_COORD");
651651
DEFINE_VARIABLE(PSInd, InVar, "sv_isfrontface", "_GET_GL_FRONT_FACING");
652+
DEFINE_VARIABLE(PSInd, InVar, "sv_coverage", "_GET_GL_SAMPLE_MASK_IN");
652653
DEFINE_VARIABLE(PSInd, OutVar, "sv_depth", "_SET_GL_FRAG_DEPTH");
653654

654655
DEFINE_VARIABLE(CSInd, InVar, "sv_dispatchthreadid", "_GET_GL_GLOBAL_INVOCATION_ID");

0 commit comments

Comments
 (0)