|
@@ -1,7 +1,7 @@
|
|
|
import DataMap from './DataMap.js';
|
|
|
import Color4 from './Color4.js';
|
|
|
import { Mesh, SphereGeometry, BackSide } from 'three';
|
|
|
-import { vec4, context, normalWorld, backgroundBlurriness, backgroundIntensity, NodeMaterial, modelViewProjection } from '../../nodes/Nodes.js';
|
|
|
+import { vec4, context, normalWorld, backgroundBlurriness, backgroundIntensity, NodeMaterial, modelViewProjection, maxMipLevel } from '../../nodes/Nodes.js';
|
|
|
|
|
|
const _clearColor = new Color4();
|
|
|
|
|
@@ -53,7 +53,7 @@ class Background extends DataMap {
|
|
|
const backgroundMeshNode = context( vec4( backgroundNode ), {
|
|
|
// @TODO: Add Texture2D support using node context
|
|
|
getUV: () => normalWorld,
|
|
|
- getTextureLevel: () => backgroundBlurriness
|
|
|
+ getTextureLevel: ( textureNode ) => backgroundBlurriness.mul( maxMipLevel( textureNode ) )
|
|
|
} ).mul( backgroundIntensity );
|
|
|
|
|
|
let viewProj = modelViewProjection();
|