File tree Expand file tree Collapse file tree
packages/typegpu-three/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,13 @@ import {
33 uniform as uniformImpl ,
44 uniformArray as uniformArrayImpl ,
55} from 'three/tsl' ;
6- import type { Node , TSL , UniformArrayNode , UniformNode } from 'three/webgpu' ;
6+ import type {
7+ Color ,
8+ Node ,
9+ TSL ,
10+ UniformArrayNode ,
11+ UniformNode ,
12+ } from 'three/webgpu' ;
713import * as d from 'typegpu/data' ;
814import { wgslTypeToGlslType } from './common.ts' ;
915import { fromTSL , type TSLAccessor } from './typegpu-node.ts' ;
@@ -28,7 +34,7 @@ export function uniform<TValue, TDataType extends d.AnyWgslData>(
2834 let glslType : string | undefined =
2935 wgslTypeToGlslType [ dataType . type as keyof typeof wgslTypeToGlslType ] ;
3036
31- if ( ( value as TSL . NodeObject < Node > ) . isNode ) {
37+ if ( ( value as TSL . NodeObject < Node > ) . isNode || ( value as Color ) . isColor ) {
3238 // The type sometimes interferes with the node's inherent type
3339 glslType = undefined ;
3440 }
You can’t perform that action at this time.
0 commit comments