JetBrains / JetBrains/resharper-unity

HLSL autocomplete missing common semantics

Open
#2,384 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.2k
Forks
142
PR merge metrics
No merged PRs in 30d

Description

### 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](https://user-images.githubusercontent.com/2322305/212726160-db164543-9b14-44ae-af3c-9f32732c1896.png)

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:

```xml

```

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: https://github.com/JetBrains/resharper-unity/issues/216#issuecomment-1384092151

Contributor guide

Open the contributing guide

Research direction

Start by tracing autocomplete handling for ShaderLab .shader files and the HLSLPROGRAM/ENDHLSL region. Compare the semantic suggestions against the listed missing values, including TEXCOORD{n}, and verify that the common semantics appear when typing them in Rider.

Written by the indexing model from the issue text.

Assessment

Tech stack
unity
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.