Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

fix: Stop overloading `d.location` for vertex `shaderLocation`

オープン
#2,806 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
説明が足りない
活発さ
静か
技術スタック
typescript

調査の方向性

まず、d.location が arrayOf() と vertexLayout を通じてどのように渡されるかを追跡し、struct または IO メンバーの処理と vertex shaderLocation の処理を比較します。decorator が単一の目的だけを持ち、vertexLayout が引き続き shaderLocation を受け取り、arrayOf() が @location の特別扱いを必要としなくなれば、作業は完了です。

索引モデルが issue の本文から書いたものです。

説明

fix: Stop overloading d.location for vertex shaderLocation

In WGSL, decorators like @size or @align can only decorate struct members.

Issue #2754 pointed out that we could pass decorators to arrayOf(), which usually had no effect and was misleading.

PR #2781 partially fixed this by rejecting non-@location decorations on array element types. @location remains allowed as an exception, because it is used with vertexLayout.

Problem

d.location currently means two different things depending on context:

  • On a struct / IO member, it maps to the WGSL @location attribute.
  • In a vertexLayout, decorating an array element with d.location sets the pipeline’s shaderLocation attribute.

Moreover, due to this exception, d.location can always be passed to arrayOf(), which might be misleading.

Proposal

Make decorators single-purpose and find another way to pass shaderLocation to the vertexLayout, so arrayOf() no longer needs a special case for @location.

主要言語
TypeScript
スター
3.3k
フォーク
135
平均マージ
4日 1時間
マージ済み PR(30日)
64

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

software-mansion/TypeGPU のほかの issue

software-mansion/TypeGPU の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。