mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Add GLSL syntax highlighting
This commit is contained in:
@@ -322,7 +322,7 @@ namespace renderdocui.Code
|
||||
@"uintten|unormten" +
|
||||
@"|unormh|unormb" +
|
||||
@"|snormh|snormb" +
|
||||
@"|bool" + // bool is stored as 4-byte int in hlsl
|
||||
@"|bool" + // bool is stored as 4-byte int
|
||||
@"|byte|short|int" + // signed ints
|
||||
@"|ubyte|ushort|uint" + // unsigned ints
|
||||
@"|xbyte|xshort|xint" + // hex ints
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
</resheader>
|
||||
<data name="helpText.Text" xml:space="preserve">
|
||||
<value>Type in a buffer format declaration. Comments and {} braces are skipped, : semantics are ignored.
|
||||
Declare each element as an hlsl variable, e.g: "float4 first; float2 second; uint2 third;"
|
||||
Declare each element as an hlsl/glsl variable, e.g: "float4 first; float2 second; uint2 third;" or vec4/vec2.
|
||||
|
||||
Basic types accepted: bool, byte, short, int, half, float, double.
|
||||
Unsigned integer types: ubyte, ushort, uint
|
||||
|
||||
@@ -488,6 +488,14 @@ namespace renderdoc
|
||||
{
|
||||
public APIPipelineStateType pipelineType;
|
||||
public bool degraded;
|
||||
|
||||
public string ShaderExtension
|
||||
{
|
||||
get
|
||||
{
|
||||
return pipelineType == APIPipelineStateType.D3D11 ? ".hlsl" : ".glsl";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScintillaNET>
|
||||
<Language Name="glsl">
|
||||
<Indentation TabWidth="4" SmartIndentType="cpp" />
|
||||
|
||||
<Lexer LineCommentPrefix="//" StreamCommentPrefix="/* " StreamCommentSuffix=" */" >
|
||||
<Properties>
|
||||
<Property Name="styling.within.preprocessor" Value="0" />
|
||||
</Properties>
|
||||
|
||||
<Keywords List="0" Inherit="False">
|
||||
in out inout static const
|
||||
|
||||
break continue do for while switch case default if else true false discard return
|
||||
|
||||
radians degrees sin cos tan asin acos atan sinh cosh tanh asinh acosh atanh pow
|
||||
exp log exp2 log2 sqrt inversesqrt abs sign floor trunc round
|
||||
roundEven ceil fract mod modf min max clamp mix step
|
||||
smoothstep isnan isinf floatBitsToInt floatBitsToUint intBitsToFloat uintBitsToFloat fma frexp ldexp
|
||||
|
||||
packUnorm2x16 packSnorm2x16 packUnorm4x8 packSnorm4x8 unpackUnorm2x16 unpackSnorm2x16 unpackUnorm4x8 unpackSnorm4x8 packDouble2x32 unpackDouble2x32 packHalf2x16 unpackHalf2x16
|
||||
length distance dot cross normalize faceforward reflect refract matrixCompMult outerProduct transpose determinant inverse lessThan
|
||||
lessThanEqual greaterThan greaterThanEqual equal notEqual any all not uaddCarry
|
||||
usubBorrow umulExtended imulExtended bitfieldExtract bitfieldInsert bitfieldReverse bitCount findLSB findMSB
|
||||
|
||||
textureSize textureQueryLod textureQueryLevels textureSamples texture textureProj textureLod textureOffset texelFetch texelFetchOffset textureProjOffset textureLodOffset
|
||||
textureProjLod textureProjLodOffset textureGrad textureGradOffset textureProjGrad textureProjGradOffset textureGather textureGatherOffset textureGatherOffsets
|
||||
|
||||
atomicCounterIncrement atomicCounterDecrement atomicCounter atomicAdd atomicMin atomicMax atomicAnd atomicOr atomicXor atomicExchange atomicCompSwap
|
||||
|
||||
imageSize imageSamples imageLoad imageStore imageAtomicAdd imageAtomicMin imageAtomicMax imageAtomicAnd imageAtomicOr imageAtomicXor imageAtomicExchange imageAtomicCompSwap
|
||||
|
||||
dFdx dFdy dFdxFine dFdyFine dFdxCoarse dFdyCoarse fwidth fwidthFine fwidthCoarse interpolateAtCentroid
|
||||
interpolateAtSample interpolateAtOffset EmitStreamVertex EndStreamPrimitive EmitVertex EndPrimitive
|
||||
barrier memoryBarrier memoryBarrierAtomicCounter memoryBarrierBuffer memoryBarrierShared memoryBarrierImage groupMemoryBarrier
|
||||
|
||||
gl_CullDistance gl_FragCoord gl_FragDepth gl_FrontFacing gl_GlobalInvocationID gl_HelperInvocation gl_in gl_InstanceID gl_InvocationID gl_Layer gl_LocalInvocationID
|
||||
gl_LocalInvocationIndex gl_MaxPatchVertices gl_NumWorkGroups gl_out gl_PatchVerticesIn gl_PerVertex gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID
|
||||
gl_PrimitiveIDIn gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_TessCoord gl_TessLevelInner
|
||||
gl_TessLevelOuter gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize
|
||||
|
||||
gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize gl_MaxComputeUniformComponents gl_MaxComputeTextureImageUnits gl_MaxComputeImageUniforms gl_MaxComputeAtomicCounters gl_MaxComputeAtomicCounterBuffers gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingComponents gl_MaxVertexOutputComponents gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxFragmentInputComponents gl_MaxVertexTextureImageUnits gl_MaxCombinedTextureImageUnits
|
||||
gl_MaxTextureImageUnits gl_MaxImageUnits gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedShaderOutputResources gl_MaxImageSamples gl_MaxVertexImageUniforms gl_MaxTessControlImageUniforms gl_MaxTessEvaluationImageUniforms gl_MaxGeometryImageUniforms gl_MaxFragmentImageUniforms gl_MaxCombinedImageUniforms gl_MaxFragmentUniformComponents gl_MaxDrawBuffers gl_MaxClipDistances gl_MaxGeometryTextureImageUnits gl_MaxGeometryOutputVertices
|
||||
gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlUniformComponents gl_MaxTessControlTotalOutputComponents gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessPatchComponents gl_MaxPatchVertices gl_MaxTessGenLevel gl_MaxViewports gl_MaxVertexUniformVectors gl_MaxFragmentUniformVectors
|
||||
gl_MaxVaryingVectors gl_MaxVertexAtomicCounters gl_MaxTessControlAtomicCounters gl_MaxTessEvaluationAtomicCounters gl_MaxGeometryAtomicCounters gl_MaxFragmentAtomicCounters gl_MaxCombinedAtomicCounters gl_MaxAtomicCounterBindings gl_MaxVertexAtomicCounterBuffers gl_MaxTessControlAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxGeometryAtomicCounterBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxCombinedAtomicCounterBuffers gl_MaxAtomicCounterBufferSize gl_MinProgramTexelOffset
|
||||
gl_MaxProgramTexelOffset gl_MaxTransformFeedbackBuffers gl_MaxTransformFeedbackInterleavedComponents gl_MaxCullDistances gl_MaxCombinedClipAndCullDistances gl_MaxSamples gl_MaxVertexImageUniforms gl_MaxFragmentImageUniforms gl_MaxComputeImageUniforms gl_MaxCombinedImageUniforms gl_MaxCombinedShaderOutputResources gl_DepthRangeParameters gl_DepthRange gl_NumSamples
|
||||
</Keywords>
|
||||
<Keywords List="1" Inherit="False">
|
||||
float double int void bool
|
||||
|
||||
mat2 mat3 mat4 dmat2 dmat3 dmat4
|
||||
mat2x2 mat2x3 mat2x4 dmat2x2 dmat2x3 dmat2x4
|
||||
mat3x2 mat3x3 mat3x4 dmat3x2 dmat3x3 dmat3x4
|
||||
mat4x2 mat4x3 mat4x4 dmat4x2 dmat4x3 dmat4x4
|
||||
vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 dvec2 dvec3 dvec4
|
||||
uint uvec2 uvec3 uvec4
|
||||
|
||||
atomic_uint patch sample buffer subroutine struct
|
||||
|
||||
invariant precise layout
|
||||
|
||||
lowp mediump highp precision
|
||||
attribute uniform varying shared
|
||||
coherent volatile restrict readonly writeonly
|
||||
centroid flat smooth noperspective
|
||||
|
||||
sampler1D sampler2D sampler3D samplerCube
|
||||
sampler1DShadow sampler2DShadow samplerCubeShadow
|
||||
sampler1DArray sampler2DArray
|
||||
sampler1DArrayShadow sampler2DArrayShadow
|
||||
isampler1D isampler2D isampler3D isamplerCube
|
||||
isampler1DArray isampler2DArray
|
||||
usampler1D usampler2D usampler3D usamplerCube
|
||||
usampler1DArray usampler2DArray
|
||||
sampler2DRect sampler2DRectShadow isampler2DRect usampler2DRect
|
||||
samplerBuffer isamplerBuffer usamplerBuffer
|
||||
sampler2DMS isampler2DMS usampler2DMS
|
||||
sampler2DMSArray isampler2DMSArray usampler2DMSArray
|
||||
samplerCubeArray samplerCubeArrayShadow isamplerCubeArray usamplerCubeArray
|
||||
|
||||
image1D iimage1D uimage1D
|
||||
image2D iimage2D uimage2D
|
||||
image3D iimage3D uimage3D
|
||||
image2DRect iimage2DRect uimage2DRect
|
||||
imageCube iimageCube uimageCube
|
||||
imageBuffer iimageBuffer uimageBuffer
|
||||
image1DArray iimage1DArray uimage1DArray
|
||||
image2DArray iimage2DArray uimage2DArray
|
||||
imageCubeArray iimageCubeArray uimageCubeArray
|
||||
image2DMS iimage2DMS uimage2DMS
|
||||
image2DMSArray iimage2DMSArray uimage2DMSArray
|
||||
</Keywords>
|
||||
</Lexer>
|
||||
|
||||
<Styles>
|
||||
<Style Name="DEFAULT" FontName="Consolas" Size="10" />
|
||||
<Style Name="NUMBER" ForeColor="Black" />
|
||||
<Style Name="COMMENT" ForeColor="Green" Size="10" />
|
||||
<Style Name="COMMENTBLOCK" ForeColor="Green" Size="10" />
|
||||
<Style Name="COMMENTLINE" ForeColor="Green" Size="10" />
|
||||
</Styles>
|
||||
</Language>
|
||||
</ScintillaNET>
|
||||
|
||||
@@ -4,107 +4,107 @@
|
||||
<Indentation TabWidth="4" SmartIndentType="cpp" />
|
||||
|
||||
<Lexer LineCommentPrefix="//" StreamCommentPrefix="/* " StreamCommentSuffix=" */" >
|
||||
<Properties>
|
||||
<Property Name="styling.within.preprocessor" Value="0" />
|
||||
</Properties>
|
||||
|
||||
<Keywords List="0" Inherit="False">
|
||||
<Properties>
|
||||
<Property Name="styling.within.preprocessor" Value="0" />
|
||||
</Properties>
|
||||
|
||||
<Keywords List="0" Inherit="False">
|
||||
register packoffset static const
|
||||
|
||||
break continue discard do for if else switch while case default return
|
||||
break continue discard do for if else switch while case default return true false
|
||||
|
||||
abort abs acos all AllMemoryBarrier AllMemoryBarrierWithGroupSync any asdouble asfloat asin asint asuint atan
|
||||
atan2 ceil clamp clip cos cosh countbits cross D3DCOLORtoUBYTE4 ddx ddx_coarse ddx_fine ddy ddy_coarse ddy_fine
|
||||
degrees determinant DeviceMemoryBarrier DeviceMemoryBarrierWithGroupSync distance dot dst errorf
|
||||
EvaluateAttributeAtCentroid EvaluateAttributeAtSample EvaluateAttributeSnapped exp exp2 f16tof32 f32tof16
|
||||
faceforward firstbithigh firstbitlow floor fma fmod frac frexp fwidth GetRenderTargetSampleCount GetRenderTargetSamplePosition
|
||||
GroupMemoryBarrier GroupMemoryBarrierWithGroupSync InterlockedAdd InterlockedAnd InterlockedCompareExchange
|
||||
InterlockedCompareStore InterlockedExchange InterlockedMax InterlockedMin InterlockedOr InterlockedXor isfinite
|
||||
isinf isnan ldexp length lerp lit log log10 log2 mad max min modf msad4 mul noise normalize pow printf
|
||||
Process2DQuadTessFactorsAvg Process2DQuadTessFactorsMax Process2DQuadTessFactorsMin ProcessIsolineTessFactors
|
||||
ProcessQuadTessFactorsAvg ProcessQuadTessFactorsMax ProcessQuadTessFactorsMin ProcessTriTessFactorsAvg
|
||||
ProcessTriTessFactorsMax ProcessTriTessFactorsMin radians rcp reflect refract reversebits round rsqrt saturate
|
||||
sign sin sincos sinh smoothstep sqrt step tan tanh tex1D tex1Dbias tex1Dgrad tex1Dlod tex1Dproj
|
||||
tex2D tex2Dbias tex2Dgrad tex2Dlod tex2Dproj tex3D tex3Dbias tex3Dgrad tex3Dlod tex3Dproj texCUBE texCUBEbias
|
||||
texCUBEgrad texCUBElod texCUBEproj transpose trunc
|
||||
|
||||
BINORMAL BINORMAL0 BINORMAL1 BINORMAL2 BINORMAL3 BINORMAL4 BINORMAL5 BINORMAL6 BINORMAL7
|
||||
BLENDINDICES BLENDINDICES0 BLENDINDICES1 BLENDINDICES2 BLENDINDICES3 BLENDINDICES4 BLENDINDICES5 BLENDINDICES6 BLENDINDICES7
|
||||
BLENDWEIGHT BLENDWEIGHT0 BLENDWEIGHT1 BLENDWEIGHT2 BLENDWEIGHT3 BLENDWEIGHT4 BLENDWEIGHT5 BLENDWEIGHT6 BLENDWEIGHT7
|
||||
COLOR COLOR0 COLOR1 COLOR2 COLOR3 COLOR4 COLOR5 COLOR6 COLOR7
|
||||
NORMAL NORMAL0 NORMAL1 NORMAL2 NORMAL3 NORMAL4 NORMAL5 NORMAL6 NORMAL7
|
||||
POSITION POSITION0 POSITION1 POSITION2 POSITION3 POSITION4 POSITION5 POSITION6 POSITION7
|
||||
POSITIONT
|
||||
PSIZE PSIZE0 PSIZE1 PSIZE2 PSIZE3 PSIZE4 PSIZE5 PSIZE6 PSIZE7
|
||||
TANGENT TANGENT0 TANGENT1 TANGENT2 TANGENT3 TANGENT4 TANGENT5 TANGENT6 TANGENT7
|
||||
TEXCOORD TEXCOORD0 TEXCOORD1 TEXCOORD2 TEXCOORD3 TEXCOORD4 TEXCOORD5 TEXCOORD6 TEXCOORD7 TEXCOORD8 TEXCOORD9
|
||||
TEXCOORD0 TEXCOORD1 TEXCOORD2 TEXCOORD3 TEXCOORD4 TEXCOORD5 TEXCOORD6 TEXCOORD7 TEXCOORD8 TEXCOORD9
|
||||
abort abs acos all AllMemoryBarrier AllMemoryBarrierWithGroupSync any asdouble asfloat asin asint asuint atan
|
||||
atan2 ceil clamp clip cos cosh countbits cross D3DCOLORtoUBYTE4 ddx ddx_coarse ddx_fine ddy ddy_coarse ddy_fine
|
||||
degrees determinant DeviceMemoryBarrier DeviceMemoryBarrierWithGroupSync distance dot dst errorf
|
||||
EvaluateAttributeAtCentroid EvaluateAttributeAtSample EvaluateAttributeSnapped exp exp2 f16tof32 f32tof16
|
||||
faceforward firstbithigh firstbitlow floor fma fmod frac frexp fwidth GetRenderTargetSampleCount GetRenderTargetSamplePosition
|
||||
GroupMemoryBarrier GroupMemoryBarrierWithGroupSync InterlockedAdd InterlockedAnd InterlockedCompareExchange
|
||||
InterlockedCompareStore InterlockedExchange InterlockedMax InterlockedMin InterlockedOr InterlockedXor isfinite
|
||||
isinf isnan ldexp length lerp lit log log10 log2 mad max min modf msad4 mul noise normalize pow printf
|
||||
Process2DQuadTessFactorsAvg Process2DQuadTessFactorsMax Process2DQuadTessFactorsMin ProcessIsolineTessFactors
|
||||
ProcessQuadTessFactorsAvg ProcessQuadTessFactorsMax ProcessQuadTessFactorsMin ProcessTriTessFactorsAvg
|
||||
ProcessTriTessFactorsMax ProcessTriTessFactorsMin radians rcp reflect refract reversebits round rsqrt saturate
|
||||
sign sin sincos sinh smoothstep sqrt step tan tanh tex1D tex1Dbias tex1Dgrad tex1Dlod tex1Dproj
|
||||
tex2D tex2Dbias tex2Dgrad tex2Dlod tex2Dproj tex3D tex3Dbias tex3Dgrad tex3Dlod tex3Dproj texCUBE texCUBEbias
|
||||
texCUBEgrad texCUBElod texCUBEproj transpose trunc
|
||||
|
||||
BINORMAL BINORMAL0 BINORMAL1 BINORMAL2 BINORMAL3 BINORMAL4 BINORMAL5 BINORMAL6 BINORMAL7
|
||||
BLENDINDICES BLENDINDICES0 BLENDINDICES1 BLENDINDICES2 BLENDINDICES3 BLENDINDICES4 BLENDINDICES5 BLENDINDICES6 BLENDINDICES7
|
||||
BLENDWEIGHT BLENDWEIGHT0 BLENDWEIGHT1 BLENDWEIGHT2 BLENDWEIGHT3 BLENDWEIGHT4 BLENDWEIGHT5 BLENDWEIGHT6 BLENDWEIGHT7
|
||||
COLOR COLOR0 COLOR1 COLOR2 COLOR3 COLOR4 COLOR5 COLOR6 COLOR7
|
||||
NORMAL NORMAL0 NORMAL1 NORMAL2 NORMAL3 NORMAL4 NORMAL5 NORMAL6 NORMAL7
|
||||
POSITION POSITION0 POSITION1 POSITION2 POSITION3 POSITION4 POSITION5 POSITION6 POSITION7
|
||||
POSITIONT
|
||||
PSIZE PSIZE0 PSIZE1 PSIZE2 PSIZE3 PSIZE4 PSIZE5 PSIZE6 PSIZE7
|
||||
TANGENT TANGENT0 TANGENT1 TANGENT2 TANGENT3 TANGENT4 TANGENT5 TANGENT6 TANGENT7
|
||||
TEXCOORD TEXCOORD0 TEXCOORD1 TEXCOORD2 TEXCOORD3 TEXCOORD4 TEXCOORD5 TEXCOORD6 TEXCOORD7 TEXCOORD8 TEXCOORD9
|
||||
TEXCOORD0 TEXCOORD1 TEXCOORD2 TEXCOORD3 TEXCOORD4 TEXCOORD5 TEXCOORD6 TEXCOORD7 TEXCOORD8 TEXCOORD9
|
||||
|
||||
SV_Coverage SV_Depth SV_DispatchThreadID SV_DomainLocation SV_GroupID SV_GroupIndex SV_GroupThreadID SV_GSInstanceID SV_InsideTessFactor SV_IsFrontFace SV_OutputControlPointID SV_POSITION SV_Position SV_RenderTargetArrayIndex SV_SampleIndex SV_TessFactor SV_ViewportArrayIndex SV_InstanceID SV_PrimitiveID SV_VertexID SV_TargetID
|
||||
SV_TARGET SV_Target SV_Target0 SV_Target1 SV_Target2 SV_Target3 SV_Target4 SV_Target5 SV_Target6 SV_Target7
|
||||
SV_ClipDistance0 SV_ClipDistance1 SV_ClipDistance2 SV_ClipDistance3 SV_ClipDistance4 SV_ClipDistance5 SV_ClipDistance6 SV_ClipDistance7
|
||||
SV_CullDistance0 SV_CullDistance1 SV_CullDistance2 SV_CullDistance3 SV_CullDistance4 SV_CullDistance5 SV_CullDistance6 SV_CullDistance7
|
||||
SV_Coverage SV_Depth SV_DispatchThreadID SV_DomainLocation SV_GroupID SV_GroupIndex SV_GroupThreadID SV_GSInstanceID SV_InsideTessFactor SV_IsFrontFace SV_OutputControlPointID SV_POSITION SV_Position SV_RenderTargetArrayIndex SV_SampleIndex SV_TessFactor SV_ViewportArrayIndex SV_InstanceID SV_PrimitiveID SV_VertexID SV_TargetID
|
||||
SV_TARGET SV_Target SV_Target0 SV_Target1 SV_Target2 SV_Target3 SV_Target4 SV_Target5 SV_Target6 SV_Target7
|
||||
SV_ClipDistance0 SV_ClipDistance1 SV_ClipDistance2 SV_ClipDistance3 SV_ClipDistance4 SV_ClipDistance5 SV_ClipDistance6 SV_ClipDistance7
|
||||
SV_CullDistance0 SV_CullDistance1 SV_CullDistance2 SV_CullDistance3 SV_CullDistance4 SV_CullDistance5 SV_CullDistance6 SV_CullDistance7
|
||||
</Keywords>
|
||||
<Keywords List="1" Inherit="False">
|
||||
bool bool1 bool2 bool3 bool4
|
||||
bool1x1 bool1x2 bool1x3 bool1x4
|
||||
bool2x1 bool2x2 bool2x3 bool2x4
|
||||
bool3x1 bool3x2 bool3x3 bool3x4
|
||||
bool4x1 bool4x2 bool4x3 bool4x4
|
||||
<Keywords List="1" Inherit="False">
|
||||
bool bool1 bool2 bool3 bool4
|
||||
bool1x1 bool1x2 bool1x3 bool1x4
|
||||
bool2x1 bool2x2 bool2x3 bool2x4
|
||||
bool3x1 bool3x2 bool3x3 bool3x4
|
||||
bool4x1 bool4x2 bool4x3 bool4x4
|
||||
|
||||
int int1 int2 int3 int4
|
||||
int1x1 int1x2 int1x3 int1x4
|
||||
int2x1 int2x2 int2x3 int2x4
|
||||
int3x1 int3x2 int3x3 int3x4
|
||||
int4x1 int4x2 int4x3 int4x4
|
||||
int int1 int2 int3 int4
|
||||
int1x1 int1x2 int1x3 int1x4
|
||||
int2x1 int2x2 int2x3 int2x4
|
||||
int3x1 int3x2 int3x3 int3x4
|
||||
int4x1 int4x2 int4x3 int4x4
|
||||
|
||||
uint uint1 uint2 uint3 uint4
|
||||
uint1x1 uint1x2 uint1x3 uint1x4
|
||||
uint2x1 uint2x2 uint2x3 uint2x4
|
||||
uint3x1 uint3x2 uint3x3 uint3x4
|
||||
uint4x1 uint4x2 uint4x3 uint4x4
|
||||
uint uint1 uint2 uint3 uint4
|
||||
uint1x1 uint1x2 uint1x3 uint1x4
|
||||
uint2x1 uint2x2 uint2x3 uint2x4
|
||||
uint3x1 uint3x2 uint3x3 uint3x4
|
||||
uint4x1 uint4x2 uint4x3 uint4x4
|
||||
|
||||
UINT UINT2 UINT3 UINT4
|
||||
UINT UINT2 UINT3 UINT4
|
||||
|
||||
dword dword1 dword2 dword3 dword4
|
||||
dword1x1 dword1x2 dword1x3 dword1x4
|
||||
dword2x1 dword2x2 dword2x3 dword2x4
|
||||
dword3x1 dword3x2 dword3x3 dword3x4
|
||||
dword4x1 dword4x2 dword4x3 dword4x4
|
||||
dword dword1 dword2 dword3 dword4
|
||||
dword1x1 dword1x2 dword1x3 dword1x4
|
||||
dword2x1 dword2x2 dword2x3 dword2x4
|
||||
dword3x1 dword3x2 dword3x3 dword3x4
|
||||
dword4x1 dword4x2 dword4x3 dword4x4
|
||||
|
||||
half half1 half2 half3 half4
|
||||
half1x1 half1x2 half1x3 half1x4
|
||||
half2x1 half2x2 half2x3 half2x4
|
||||
half3x1 half3x2 half3x3 half3x4
|
||||
half4x1 half4x2 half4x3 half4x4
|
||||
half half1 half2 half3 half4
|
||||
half1x1 half1x2 half1x3 half1x4
|
||||
half2x1 half2x2 half2x3 half2x4
|
||||
half3x1 half3x2 half3x3 half3x4
|
||||
half4x1 half4x2 half4x3 half4x4
|
||||
|
||||
float float1 float2 float3 float4
|
||||
float1x1 float1x2 float1x3 float1x4
|
||||
float2x1 float2x2 float2x3 float2x4
|
||||
float3x1 float3x2 float3x3 float3x4
|
||||
float4x1 float4x2 float4x3 float4x4
|
||||
float float1 float2 float3 float4
|
||||
float1x1 float1x2 float1x3 float1x4
|
||||
float2x1 float2x2 float2x3 float2x4
|
||||
float3x1 float3x2 float3x3 float3x4
|
||||
float4x1 float4x2 float4x3 float4x4
|
||||
|
||||
double double1 double2 double3 double4
|
||||
double1x1 double1x2 double1x3 double1x4
|
||||
double2x1 double2x2 double2x3 double2x4
|
||||
double3x1 double3x2 double3x3 double3x4
|
||||
double4x1 double4x2 double4x3 double4x4
|
||||
double double1 double2 double3 double4
|
||||
double1x1 double1x2 double1x3 double1x4
|
||||
double2x1 double2x2 double2x3 double2x4
|
||||
double3x1 double3x2 double3x3 double3x4
|
||||
double4x1 double4x2 double4x3 double4x4
|
||||
|
||||
snorm unorm string void cbuffer struct
|
||||
snorm unorm string void cbuffer struct
|
||||
|
||||
Buffer AppendStructuredBfufer ByteAddressBuffer ConsumeStructuredBuffer StructuredBuffer
|
||||
RWBuffer RWByteAddressBuffer RWStructuredBuffer RWTexture1D RWTexture1DArray RWTexture2D RWTexture2DArray RWTexture3D
|
||||
Buffer AppendStructuredBfufer ByteAddressBuffer ConsumeStructuredBuffer StructuredBuffer
|
||||
RWBuffer RWByteAddressBuffer RWStructuredBuffer RWTexture1D RWTexture1DArray RWTexture2D RWTexture2DArray RWTexture3D
|
||||
|
||||
InputPatch OutputPatch
|
||||
|
||||
linear centroid nointerpolation noperspective sample
|
||||
|
||||
sampler sampler1D sampler2D sampler3D samplerCUBE SamplerComparisonState SamplerState sampler_state
|
||||
AddressU AddressV AddressW BorderColor Filter MaxAnisotropy MaxLOD MinLOD MipLODBias ComparisonFunc ComparisonFilter
|
||||
InputPatch OutputPatch
|
||||
|
||||
texture Texture1D Texture1DArray Texture2D Texture2DArray Texture2DMS Texture2DMSArray Texture3D TextureCube
|
||||
linear centroid nointerpolation noperspective sample
|
||||
|
||||
sampler sampler1D sampler2D sampler3D samplerCUBE SamplerComparisonState SamplerState sampler_state
|
||||
AddressU AddressV AddressW BorderColor Filter MaxAnisotropy MaxLOD MinLOD MipLODBias ComparisonFunc ComparisonFilter
|
||||
|
||||
texture Texture1D Texture1DArray Texture2D Texture2DArray Texture2DMS Texture2DMSArray Texture3D TextureCube
|
||||
</Keywords>
|
||||
</Lexer>
|
||||
</Lexer>
|
||||
|
||||
<Styles>
|
||||
<Style Name="DEFAULT" FontName="Consolas" Size="10" />
|
||||
|
||||
@@ -1152,7 +1152,7 @@
|
||||
this.vsShaderEdit.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.vsShaderEdit.TabIndex = 26;
|
||||
this.vsShaderEdit.TabStop = false;
|
||||
this.toolTip.SetToolTip(this.vsShaderEdit, "HLSL edit and replace this shader");
|
||||
this.toolTip.SetToolTip(this.vsShaderEdit, "GLSL edit and replace this shader");
|
||||
this.vsShaderEdit.Click += new System.EventHandler(this.shaderedit_Click);
|
||||
//
|
||||
// groupBox7
|
||||
@@ -1521,7 +1521,7 @@
|
||||
this.tcsShaderEdit.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.tcsShaderEdit.TabIndex = 28;
|
||||
this.tcsShaderEdit.TabStop = false;
|
||||
this.toolTip.SetToolTip(this.tcsShaderEdit, "HLSL edit and replace this shader");
|
||||
this.toolTip.SetToolTip(this.tcsShaderEdit, "GLSL edit and replace this shader");
|
||||
this.tcsShaderEdit.Click += new System.EventHandler(this.shaderedit_Click);
|
||||
//
|
||||
// tcsTexturesGroup
|
||||
@@ -1847,7 +1847,7 @@
|
||||
this.tesShaderEdit.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.tesShaderEdit.TabIndex = 27;
|
||||
this.tesShaderEdit.TabStop = false;
|
||||
this.toolTip.SetToolTip(this.tesShaderEdit, "HLSL edit and replace this shader");
|
||||
this.toolTip.SetToolTip(this.tesShaderEdit, "GLSL edit and replace this shader");
|
||||
this.tesShaderEdit.Click += new System.EventHandler(this.shaderedit_Click);
|
||||
//
|
||||
// tesTexturesGroup
|
||||
@@ -2265,7 +2265,7 @@
|
||||
this.gsShaderEdit.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.gsShaderEdit.TabIndex = 28;
|
||||
this.gsShaderEdit.TabStop = false;
|
||||
this.toolTip.SetToolTip(this.gsShaderEdit, "HLSL edit and replace this shader");
|
||||
this.toolTip.SetToolTip(this.gsShaderEdit, "GLSL edit and replace this shader");
|
||||
this.gsShaderEdit.Click += new System.EventHandler(this.shaderedit_Click);
|
||||
//
|
||||
// groupBox24
|
||||
@@ -3443,7 +3443,7 @@
|
||||
this.psShaderEdit.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.psShaderEdit.TabIndex = 29;
|
||||
this.psShaderEdit.TabStop = false;
|
||||
this.toolTip.SetToolTip(this.psShaderEdit, "HLSL edit and replace this shader");
|
||||
this.toolTip.SetToolTip(this.psShaderEdit, "GLSL edit and replace this shader");
|
||||
this.psShaderEdit.Click += new System.EventHandler(this.shaderedit_Click);
|
||||
//
|
||||
// groupBox28
|
||||
@@ -4291,7 +4291,7 @@
|
||||
this.csShaderEdit.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.csShaderEdit.TabIndex = 36;
|
||||
this.csShaderEdit.TabStop = false;
|
||||
this.toolTip.SetToolTip(this.csShaderEdit, "HLSL edit and replace this shader");
|
||||
this.toolTip.SetToolTip(this.csShaderEdit, "GLSL edit and replace this shader");
|
||||
this.csShaderEdit.Click += new System.EventHandler(this.shaderedit_Click);
|
||||
//
|
||||
// computeDebugControls
|
||||
|
||||
@@ -1713,7 +1713,7 @@ namespace renderdocui.Windows.PipelineState
|
||||
s.Show(m_DockContent.DockPanel);
|
||||
}
|
||||
|
||||
private void MakeShaderVariablesHLSL(bool cbufferContents, ShaderConstant[] vars, ref string struct_contents, ref string struct_defs)
|
||||
private void MakeShaderVariablesGLSL(bool cbufferContents, ShaderConstant[] vars, ref string struct_contents, ref string struct_defs)
|
||||
{
|
||||
var nl = Environment.NewLine;
|
||||
var nl2 = Environment.NewLine + Environment.NewLine;
|
||||
@@ -1727,7 +1727,7 @@ namespace renderdocui.Windows.PipelineState
|
||||
if(!struct_defs.Contains(def))
|
||||
{
|
||||
string contents = "";
|
||||
MakeShaderVariablesHLSL(false, v.type.members, ref contents, ref struct_defs);
|
||||
MakeShaderVariablesGLSL(false, v.type.members, ref contents, ref struct_defs);
|
||||
|
||||
struct_defs += def + contents + "};" + nl2;
|
||||
}
|
||||
|
||||
@@ -517,7 +517,7 @@ namespace renderdocui.Windows
|
||||
this.ResumeLayout(false);
|
||||
}
|
||||
|
||||
private ScintillaNET.Scintilla MakeEditor(string name, string text, bool hlsl)
|
||||
private ScintillaNET.Scintilla MakeEditor(string name, string text, bool src)
|
||||
{
|
||||
ScintillaNET.Scintilla scintilla1 = new ScintillaNET.Scintilla();
|
||||
((System.ComponentModel.ISupportInitialize)(scintilla1)).BeginInit();
|
||||
@@ -547,25 +547,26 @@ namespace renderdocui.Windows
|
||||
|
||||
((System.ComponentModel.ISupportInitialize)(scintilla1)).EndInit();
|
||||
|
||||
var hlslpath = Path.Combine(Core.ConfigDirectory, "hlsl.xml");
|
||||
string syntaxtype = m_Core.APIProps.ShaderExtension.Substring(1);
|
||||
var syntaxpath = Path.Combine(Core.ConfigDirectory, syntaxtype + ".xml");
|
||||
|
||||
if (!File.Exists(hlslpath) ||
|
||||
File.GetLastWriteTimeUtc(hlslpath).CompareTo(File.GetLastWriteTimeUtc(Assembly.GetExecutingAssembly().Location)) < 0)
|
||||
if (!File.Exists(syntaxpath) ||
|
||||
File.GetLastWriteTimeUtc(syntaxpath).CompareTo(File.GetLastWriteTimeUtc(Assembly.GetExecutingAssembly().Location)) < 0)
|
||||
{
|
||||
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("renderdocui.Resources.hlsl.xml"))
|
||||
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("renderdocui.Resources." + syntaxtype + ".xml"))
|
||||
{
|
||||
using (StreamReader reader = new StreamReader(stream))
|
||||
{
|
||||
File.WriteAllText(hlslpath, reader.ReadToEnd());
|
||||
File.WriteAllText(syntaxpath, reader.ReadToEnd());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hlsl)
|
||||
if (src)
|
||||
{
|
||||
scintilla1.Lexing.LexerLanguageMap["hlsl"] = "cpp";
|
||||
scintilla1.Lexing.LexerLanguageMap[syntaxtype] = "cpp";
|
||||
scintilla1.ConfigurationManager.CustomLocation = Core.ConfigDirectory;
|
||||
scintilla1.ConfigurationManager.Language = "hlsl";
|
||||
scintilla1.ConfigurationManager.Language = syntaxtype;
|
||||
scintilla1.Lexing.SetProperty("lexer.cpp.track.preprocessor", "0");
|
||||
}
|
||||
else
|
||||
|
||||
@@ -546,7 +546,7 @@ namespace renderdocui.Windows
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var f in Directory.EnumerateFiles(Core.ConfigDirectory, "*.hlsl"))
|
||||
foreach (var f in Directory.EnumerateFiles(Core.ConfigDirectory, "*" + m_Core.APIProps.ShaderExtension))
|
||||
{
|
||||
var fn = Path.GetFileNameWithoutExtension(f);
|
||||
var key = fn.ToUpperInvariant();
|
||||
@@ -601,7 +601,7 @@ namespace renderdocui.Windows
|
||||
return;
|
||||
}
|
||||
|
||||
var path = Path.Combine(Core.ConfigDirectory, customShader.Text + ".hlsl");
|
||||
var path = Path.Combine(Core.ConfigDirectory, customShader.Text + m_Core.APIProps.ShaderExtension);
|
||||
File.WriteAllText(path, "float4 main(float4 pos : SV_Position, float4 uv : TEXCOORD0) : SV_Target0\n{\n\treturn float4(0,0,0,1);\n}\n");
|
||||
|
||||
// auto-open edit window
|
||||
@@ -613,7 +613,7 @@ namespace renderdocui.Windows
|
||||
var filename = customShader.Text;
|
||||
|
||||
var files = new Dictionary<string, string>();
|
||||
files.Add(filename, File.ReadAllText(Path.Combine(Core.ConfigDirectory, filename + ".hlsl")));
|
||||
files.Add(filename, File.ReadAllText(Path.Combine(Core.ConfigDirectory, filename + m_Core.APIProps.ShaderExtension)));
|
||||
ShaderViewer s = new ShaderViewer(m_Core, true, "Custom Shader", files,
|
||||
|
||||
// Save Callback
|
||||
@@ -621,7 +621,7 @@ namespace renderdocui.Windows
|
||||
{
|
||||
foreach (var f in updatedfiles)
|
||||
{
|
||||
var path = Path.Combine(Core.ConfigDirectory, f.Key + ".hlsl");
|
||||
var path = Path.Combine(Core.ConfigDirectory, f.Key + m_Core.APIProps.ShaderExtension);
|
||||
File.WriteAllText(path, f.Value);
|
||||
}
|
||||
},
|
||||
@@ -655,7 +655,7 @@ namespace renderdocui.Windows
|
||||
|
||||
if (res == DialogResult.Yes)
|
||||
{
|
||||
var path = Path.Combine(Core.ConfigDirectory, customShader.Text + ".hlsl");
|
||||
var path = Path.Combine(Core.ConfigDirectory, customShader.Text + m_Core.APIProps.ShaderExtension);
|
||||
if(!File.Exists(path))
|
||||
{
|
||||
MessageBox.Show(String.Format("Shader file {0} can't be found.\nSelect a custom shader from the drop-down", customShader.Text),
|
||||
@@ -703,7 +703,7 @@ namespace renderdocui.Windows
|
||||
this.BeginInvoke(new Action(UI_CreateThumbnails));
|
||||
});
|
||||
|
||||
m_FSWatcher = new FileSystemWatcher(Core.ConfigDirectory, "*.hlsl");
|
||||
m_FSWatcher = new FileSystemWatcher(Core.ConfigDirectory, "*" + m_Core.APIProps.ShaderExtension);
|
||||
m_FSWatcher.EnableRaisingEvents = true;
|
||||
m_FSWatcher.Changed += new FileSystemEventHandler(CustomShaderModified);
|
||||
m_FSWatcher.Renamed += new RenamedEventHandler(CustomShaderModified);
|
||||
|
||||
@@ -490,6 +490,7 @@
|
||||
<None Include="Resources\flip_y.png" />
|
||||
<None Include="Resources\asterisk_orange.png" />
|
||||
<None Include="Resources\folder_page.png" />
|
||||
<EmbeddedResource Include="Resources\glsl.xml" />
|
||||
<Content Include="Resources\RightArrow_Green_16x16.png" />
|
||||
<Content Include="Resources\icon.ico" />
|
||||
<None Include="Resources\page_white_delete.png" />
|
||||
|
||||
Reference in New Issue
Block a user