File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,12 @@ const NORMALPROPS = {
258
258
type : THREE . UnsignedByteType ,
259
259
}
260
260
261
- const CAUSTICPROPS = {
261
+ const CAUSTICPROPS : {
262
+ minFilter : THREE . MinificationTextureFilter
263
+ magFilter : THREE . MagnificationTextureFilter
264
+ type : THREE . TextureDataType
265
+ generateMipmaps : boolean
266
+ } = {
262
267
minFilter : THREE . LinearMipmapLinearFilter ,
263
268
magFilter : THREE . LinearFilter ,
264
269
type : THREE . FloatType ,
@@ -525,6 +530,12 @@ export const Caustics = (
525
530
const res = params . resolution
526
531
const normalTarget = useFBO ( res , res , NORMALPROPS )
527
532
const normalTargetB = useFBO ( res , res , NORMALPROPS )
533
+
534
+ if ( ! renderer . extensions . get ( 'OES_texture_float_linear' ) ) {
535
+ console . warn ( 'Caustics: OES_texture_float_linear extension is not supported, using HalfFloatType instead.' )
536
+ CAUSTICPROPS . type = THREE . HalfFloatType
537
+ }
538
+
528
539
const causticsTarget = useFBO ( res , res , CAUSTICPROPS )
529
540
const causticsTargetB = useFBO ( res , res , CAUSTICPROPS )
530
541
You can’t perform that action at this time.
0 commit comments