Skip to content

Conversation

@exeldro
Copy link
Contributor

@exeldro exeldro commented Mar 3, 2024

Description

Add support for:
uniform float4 test = float4(1,0,0,1);
next to the existing:
uniform float4 test = {1,0,0,1};

Motivation and Context

Support more shader stuff. This helps converting glsl shaders more easily.

How Has This Been Tested?

On windows 11 by having a shader with the new param assignment

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@PatTheMav
Copy link
Member

Can you post an example shader to test this with? I need to ensure this doesn't break Metal shader transpilation.

@exeldro
Copy link
Contributor Author

exeldro commented Aug 6, 2025

for example in

uniform float4 color = {1.0, 1.0, 1.0, 1.0};

replace {1.0, 1.0, 1.0, 1.0} with float4(1.0, 1.0, 1.0, 1.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Improvement to existing functionality

Projects

Status: Ready For Review

Development

Successfully merging this pull request may close these issues.

4 participants