T O P I C R E V I E W |
fn1186 |
Posted - Apr 10 2017 : 1:44:07 PM In my VS project there are .h, .cpp and .hlsl files. When I add hashtag //#TODO: in .h and in .cpp, I can see them in "VA Hastags" window. When I do the same in .hlsl file, it does not appear in the window.
If I rename shader.hlsl to shader.hlsl.h, VA starts to show it in "VA Hastags" window.
Is there a way to show hashtags for hlsl files? Maybe I should toggle some checkbox in VA config?
(VA ver 10.9.2212.0; VS - 2015)
Thanks in advance! |
6 L A T E S T R E P L I E S (Newest First) |
KeyC0de |
Posted - Jul 30 2022 : 11:49:16 AM quote: Originally posted by feline
Interesting, and I am seeing the same thing here. I did not know about this file extension, always something new to learn.
Based on this very small sample, the syntax looks C++ like, probably close enough not to cause to many problems. If you close all instances of the IDE, and then use regedit to edit the key:
HKCU\Software\Whole Tomato\Visual Assist X\VANet14\ExtSource = ".c;.cpp;.cc;.cxx;.tli;"
and add ".hlsl;" to the end of this string, and then reload VS2015, this will tell VA to treat these files as C++ code. As a result VA will be active in these files, and it will also pick up hashtags in these files. How helpful this is to you depends on how well the VA support in these files works, and if it helps or gets in the way.
This works feline! Thanks a lot! |
feline |
Posted - Apr 12 2017 : 06:58:10 AM Thank you for the update, I am glad this is working for you, and hopefully you won't see to many unexpected side effects from treating this as C++ code. |
fn1186 |
Posted - Apr 11 2017 : 3:45:21 PM It works! Thanks a lot!!! :) |
feline |
Posted - Apr 11 2017 : 08:37:47 AM Interesting, and I am seeing the same thing here. I did not know about this file extension, always something new to learn.
Based on this very small sample, the syntax looks C++ like, probably close enough not to cause to many problems. If you close all instances of the IDE, and then use regedit to edit the key:
HKCU\Software\Whole Tomato\Visual Assist X\VANet14\ExtSource = ".c;.cpp;.cc;.cxx;.tli;"
and add ".hlsl;" to the end of this string, and then reload VS2015, this will tell VA to treat these files as C++ code. As a result VA will be active in these files, and it will also pick up hashtags in these files. How helpful this is to you depends on how well the VA support in these files works, and if it helps or gets in the way. |
fn1186 |
Posted - Apr 11 2017 : 06:49:14 AM It is compiled via standard VS compiler (just add hlsl file to your VS project, it will automatically set "Hlsl comppiller") Select in Hlsl compiler => Shader type = pixel shader (or vertex shader). The file will be compiled after that.
This is context of the file:
//#TODO: check for Gather() impl //#TODO: + R11G11B10 instead of full RGBA16 Texture2D HDRTex;
float4 main(float4 pos : SV_POSITION) : SV_TARGET { float3 color = HDRTex[uint2(pos.xy)].rgb;
float luma = CalcLuminance(color); float newLuma = clamp((luma - cb_lumaThreshold), 0, 2);
//BrightPass filter: if newLuma == 0, color will be 0. float koef = max((newLuma / luma), 0); color = koef * color;
return float4(color, 1); } |
feline |
Posted - Apr 10 2017 : 2:04:35 PM What sort of text / code do your .hlsl files contain? Is VA active at all in these files? I suspect VA is not active in these files.
VA Hashtags are only picked up from files that VA is parsing and active in, basically code files. If these are C++ code files, then this page explains how to tell VA to parse them:
https://wholetomato.fogbugz.com/default.asp?W328 |
|
|