Skip to content

tsl transpiler not supporting Struct #30885

Open
@Makio64

Description

@Makio64

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions