@@ -99,13 +99,13 @@ const CloudMaterialMaker = (material: typeof Material) => {
99
99
const opaque_fragment = parseInt ( REVISION . replace ( / \D + / g, '' ) ) >= 154 ? 'opaque_fragment' : 'output_fragment'
100
100
this . onBeforeCompile = ( shader ) => {
101
101
shader . vertexShader =
102
- `attribute float opacity ;
102
+ `attribute float cloudOpacity ;
103
103
varying float vOpacity;
104
104
` +
105
105
shader . vertexShader . replace (
106
106
'#include <fog_vertex>' ,
107
107
`#include <fog_vertex>
108
- vOpacity = opacity ;
108
+ vOpacity = cloudOpacity ;
109
109
`
110
110
)
111
111
shader . fragmentShader =
@@ -140,7 +140,7 @@ export class Clouds extends Group {
140
140
141
141
const opAttr = new InstancedBufferAttribute ( opacities , 1 )
142
142
opAttr . setUsage ( DynamicDrawUsage )
143
- planeGeometry . setAttribute ( 'opacity ' , opAttr )
143
+ planeGeometry . setAttribute ( 'cloudOpacity ' , opAttr )
144
144
145
145
const CloudMaterial = CloudMaterialMaker ( material )
146
146
@@ -195,7 +195,7 @@ export class Clouds extends Group {
195
195
if ( instance . instanceColor ) {
196
196
setUpdateRange ( instance . instanceColor , { offset : 0 , count : count * 3 } )
197
197
}
198
- setUpdateRange ( instance . geometry . attributes . opacity as BufferAttribute , { offset : 0 , count : count } )
198
+ setUpdateRange ( instance . geometry . attributes . cloudOpacity as BufferAttribute , { offset : 0 , count : count } )
199
199
}
200
200
201
201
let t = 0
@@ -233,7 +233,7 @@ export class Clouds extends Group {
233
233
}
234
234
235
235
// Update instance
236
- instance . geometry . attributes . opacity . needsUpdate = true
236
+ instance . geometry . attributes . cloudOpacity . needsUpdate = true
237
237
instance . instanceMatrix . needsUpdate = true
238
238
if ( instance . instanceColor ) instance . instanceColor . needsUpdate = true
239
239
}
0 commit comments