Skip to content

tsl transpiler not supporting Struct #30885

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

Open
Makio64 opened this issue Apr 7, 2025 · 0 comments
Open

tsl transpiler not supporting Struct #30885

Makio64 opened this issue Apr 7, 2025 · 0 comments
Labels
Low priority TSL Three.js Shading Language

Comments

@Makio64
Copy link
Contributor

Makio64 commented Apr 7, 2025

Description

while trying to avoid the array issues #30858 i hit another bug in the transpiler not supporting the struct :

struct Edges {
    vec2 a
    vec2 b
    vec2 c
    vec2 d
}

Edges marching_square(vec2 uv, float level) {
    Edges e
    e.a = vec2(-50.)
    e.b = vec2(-50.)
    e.c = vec2(-50.)
    e.d = vec2(-50.)
    return e
}

transpile to

// Three.js Transpiler r175

import { float } from 'three/tsl';

float( - 50. );

Reproduction steps

Test it in : https://threejs.org/examples/webgpu_tsl_transpiler.html

Code

X

Live example

https://threejs.org/examples/webgpu_tsl_transpiler.html

Screenshots

No response

Version

r176dev

Device

No response

Browser

No response

OS

No response

@sunag sunag added TSL Three.js Shading Language Low priority labels Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Low priority TSL Three.js Shading Language
Projects
None yet
Development

No branches or pull requests

2 participants