未验证 提交 525bfedd 编写于 作者: E Emmett Lalish 提交者: GitHub

switched to ShaderMaterial (#23561)

上级 12443160
......@@ -15,7 +15,7 @@ import { BufferGeometry } from '../core/BufferGeometry.js';
import { Mesh } from '../objects/Mesh.js';
import { OrthographicCamera } from '../cameras/OrthographicCamera.js';
import { PerspectiveCamera } from '../cameras/PerspectiveCamera.js';
import { RawShaderMaterial } from '../materials/RawShaderMaterial.js';
import { ShaderMaterial } from '../materials/ShaderMaterial.js';
import { Vector3 } from '../math/Vector3.js';
import { Color } from '../math/Color.js';
import { WebGLRenderTarget } from '../renderers/WebGLRenderTarget.js';
......@@ -654,7 +654,7 @@ function _getBlurShader( lodMax, width, height ) {
const weights = new Float32Array( MAX_SAMPLES );
const poleAxis = new Vector3( 0, 1, 0 );
const shaderMaterial = new RawShaderMaterial( {
const shaderMaterial = new ShaderMaterial( {
name: 'SphericalGaussianBlur',
......@@ -679,8 +679,6 @@ function _getBlurShader( lodMax, width, height ) {
fragmentShader: /* glsl */`
#extension GL_EXT_shader_texture_lod : enable
precision mediump float;
precision mediump int;
......@@ -753,7 +751,7 @@ function _getBlurShader( lodMax, width, height ) {
function _getEquirectShader() {
const shaderMaterial = new RawShaderMaterial( {
const shaderMaterial = new ShaderMaterial( {
name: 'EquirectangularToCubeUV',
......@@ -796,7 +794,7 @@ function _getEquirectShader() {
function _getCubemapShader() {
const shaderMaterial = new RawShaderMaterial( {
const shaderMaterial = new ShaderMaterial( {
name: 'CubemapToCubeUV',
......@@ -842,8 +840,6 @@ function _getCommonVertexShader() {
precision mediump float;
precision mediump int;
attribute vec3 position;
attribute vec2 uv;
attribute float faceIndex;
varying vec3 vOutputDirection;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册