screen-space-reflections
Advanced tools
Comparing version 2.0.1 to 2.0.3
import { Pass, RenderPass, DepthPass, Effect } from 'postprocessing'; | ||
import { WebGLRenderTarget, NearestFilter, ShaderMaterial, Uniform, ShaderChunk, Matrix4, Vector2, Matrix3, UniformsUtils, TangentSpaceNormalMap, GLSL3, HalfFloatType, FrontSide, VideoTexture, WebGLMultipleRenderTargets, FramebufferTexture, RGBAFormat, Vector3, Quaternion } from 'three'; | ||
import WEBGL from 'three/examples/jsm/capabilities/WebGL.js'; | ||
@@ -558,2 +557,11 @@ function _extends() { | ||
const isWebGL2Available = () => { | ||
try { | ||
const canvas = document.createElement("canvas"); | ||
return !!(window.WebGL2RenderingContext && canvas.getContext("webgl2")); | ||
} catch (e) { | ||
return false; | ||
} | ||
}; | ||
var _defaultMaterials = /*#__PURE__*/_classPrivateFieldLooseKey("defaultMaterials"); | ||
@@ -619,3 +627,3 @@ | ||
this.renderPass = new RenderPass(this._scene, this._camera); | ||
_classPrivateFieldLooseBase(this, _USE_MRT)[_USE_MRT] = options.USE_MRT && WEBGL.isWebGL2Available(); | ||
_classPrivateFieldLooseBase(this, _USE_MRT)[_USE_MRT] = options.USE_MRT && isWebGL2Available(); | ||
@@ -622,0 +630,0 @@ if (_classPrivateFieldLooseBase(this, _USE_MRT)[_USE_MRT]) { |
@@ -68,3 +68,3 @@ { | ||
}, | ||
"version": "2.0.1", | ||
"version": "2.0.3", | ||
"lint-staged": { | ||
@@ -71,0 +71,0 @@ "*.{js,css,md}": "prettier --write" |
@@ -5,5 +5,5 @@ # three.js Screen Space Reflections | ||
<br></br> | ||
[<img src="https://raw.githubusercontent.com/0beqz/screen-space-reflections/screenshots/1.png">](https://screen-space-reflections.vercel.app/?dancer=true) | ||
[<img src="https://raw.githubusercontent.com/0beqz/screen-space-reflections/screenshots/1.png">](https://screen-space-reflections.vercel.app) | ||
<br></br> | ||
[<img src="https://raw.githubusercontent.com/0beqz/screen-space-reflections/screenshots//2.png">](https://screen-space-reflections.vercel.app/?dancer=true) | ||
<img src="https://raw.githubusercontent.com/0beqz/screen-space-reflections/screenshots//2.png"> | ||
<br></br> | ||
@@ -171,3 +171,3 @@ | ||
- Introduced Temporal Reprojection to reduce noise for the reflections when moving the camera by reprojection the last frame's reflection into the current one | ||
- Introduced Temporal Reprojection to reduce noise for the reflections when moving the camera by reprojecting the last frame's reflections into the current one | ||
- Implemented accumulative sampling by saving and re-using the last frame's reflections to accumulate especially jittered reflections over frames | ||
@@ -174,0 +174,0 @@ - Made all SSR-related options (e.g. `thickness`, `ior`, `rayStep`,...) reactive so that you now just need to set `ssrEffect.rayStep = value` for example to update values |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
126196
1888