Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLSL autocomplete missing common semantics #2384

Open
jamesplease opened this issue Jan 16, 2023 · 2 comments
Open

HLSL autocomplete missing common semantics #2384

jamesplease opened this issue Jan 16, 2023 · 2 comments

Comments

@jamesplease
Copy link

jamesplease commented Jan 16, 2023

What I'm seeing

Common semantics are missing from autocomplete in Rider. A list of missing semantics are:

  • TEXCOORD0 (more generally, TEXCOORD{n})
  • SV_POSITION
  • POSITION
  • INTERNALTESSPOS
  • SV_TESSFACTOR
  • SV_INSIDETESSFACTOR

though there may be others. The following screenshot shows the autocomplete suggestions when beginning to type SV_POSITION.

image

If it would be helpful I can provide more screenshots of what appears when I start typing those other semantics.

Expected behavior

These common semantics would be included as autocomplete suggestions.

Environmental Setup

  • Rider version: 2022.3.1
  • Unity version: 2021.3.16f1 (LTS)
  • Jetbrains Rider Editor package: 3.0.18

The shaders are included in the .csproj file in the following way:

<None Include="Assets\Materials\Shaders\Plot.shader" />

Other features are functioning correctly, including code formatting, syntax highlighting, and context-aware features such as recognizing when #include'd files are used or not.

Lastly, these shaders are being written in ShaderLab files with a .shader extension and are within HLSLPROGRAM and ENDHLSL.

Other Notes

Tested on 2 different PCs running Windows 11 and on several different Unity projects.


Originally asked here: #216 (comment)

@citizenmatt
Copy link
Member

Thanks. After investigation, these are intrinsics that are automatically defined, rather than defined in files that are added to the context via #include. As such, the system doesn't know about them unless we also add them to the parse context.

@jamesplease
Copy link
Author

Thanks so much for looking into this! If there’s a way for me to PR adding these to the parse context I’d be happy to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants