WebGL

Three.js antialiasing not working on Chrome

折月煮酒 提交于 2019-12-05 18:16:20
I'm currently running Chrome v31 and antialiasing seems to not be working at all. No errors in either browsers. Possibly relevant code: var renderer = new THREE.WebGLRenderer( { antialias: true } ); In Safari it renders fine: vs Chrome: Cilan It seems to be a rendering issue with Chrome, perhaps you have the 32 bit Chrome installed? You can do two things to increase the quality. First set a renderer attribute renderer.shadowMapType = THREE.PCFSoftShadowMap; // options are THREE.BasicShadowMap | THREE.PCFShadowMap | THREE.PCFSoftShadowMap and then you can also increase the shadowmap size of

Rendering a video with webGL in IOS 10 beta 7 (Safari) - shows weird purplish colors

你说的曾经没有我的故事 提交于 2019-12-05 17:53:45
I'm rendering a video in webGL, by passing a Video object as the source for texImage2D . This works great in all platforms (that supports webGL), however in Safari in IOS 10 beta 7, it is rendered with weird colors (in previous IOS versions it looks ok). For example, this is an image frame from it, that looks how it's supposed: And this is how it's rendered in IOS 10 (the weird version): Is this an IOS10 beta bug? Here is the render code (that happens for each frame): gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); gl.bindTexture(gl.TEXTURE_2D, frameTexture); gl.texImage2D(gl.TEXTURE_2D,

Laya 字节跳动小游戏接入问题汇总(持续更新)

ぐ巨炮叔叔 提交于 2019-12-05 17:47:01
目前使用的发布操作 发布字节跳动直接使用“微信小游戏”的形式 问题1:平台定义的必接功能 https://developer.toutiao.com/dev/cn/mini-game/introduction/plugin-reference/develop-and-adjust#%E5%BF%85%E6%8E%A5%E5%8A%9F%E8%83%BD 视频激励-录屏分享参考规范 https://microapp.bytedance.com/dev/cn/mini-game/introduction/notice/video-stimulation-screen-recording-reference-norms 问题2:创建开放与画布时出现异常 //关闭WebGL2 Config.useWebGL2 = false; 设置Config时,需要在Laya.init()之前设置。 问题3:没有分包的功能,只能通过远程加载 https://developer.toutiao.com/dev/cn/mini-game/develop/api/mini-game/bytedance-mini-game#%E4%BB%A3%E7%A0%81%E5%8C%85%E9%99%90%E5%88%B6 官方文档截图 字节跳动开发者工具上传时截图 PS:真实总包体限制为8M,与文档不符

unity发布webgl 部署IIS

萝らか妹 提交于 2019-12-05 17:27:30
阿里云的ecs 默认在后台 封了80端口 以至于IIS部署好之后localhost查看的到网页,公网ip却无法登陆,解决办法是: 添加80端口到安全组 IIS8.0 放入unity打包好的三个文件直接到: 依然会报错 解决办法是 添加MIME类型 腾讯云 可以直接添加.config 文件 阿里云添加config文件会报错 为什么会报错,不是web开发 待以后研究 阿里云通过添加MIME类型可以解决 来源: https://www.cnblogs.com/pz904/p/11936932.html

Display multiple instances of three.js in a single page

对着背影说爱祢 提交于 2019-12-05 15:46:23
I have a web app where I need to display multiple 3D objects in different containers. For the moment, I have been instantiating multiple three.js renderers, one per container. However, I get this error message: "WARNING: Too many active WebGL contexts. Oldest context will be lost" and after ~10 renderers I can't open any more. Here's an example http://brainspell.org/article/24996404 How should I go to have multiple three.js containers in a single web page? Is it possible to have a single renderer with multiple scenes and draw each scene in a different container (a different renderer.domElement

Three.js: Panorama Cube to Zoom In and Transition Into a Different Panorama Cube

被刻印的时光 ゝ 提交于 2019-12-05 15:41:28
I am new to Three.js. I am using this example with 6 image cube for panorama effect, where one can pan, zoom in and out around cubes. https://threejs.org/examples/?q=panorama#webgl_panorama_equirectangular I want to figure out how, at maximum zoom-in level, I can transition user into a different panorama cube (with different image source), mapped to this particular cube part. So I would, sort of, open the next scene to take user further to the next level in his journey. This is nearly what Google Street View does when you click on arrows to move forward down the road. I do not see many

Is updating the entire VBO on each frame the most efficient way to draw many changing unique triangles?

不想你离开。 提交于 2019-12-05 15:39:25
Answers to my previous question suggested that I use a Vertex Buffer Object and merge my position data with my color data into a single array, which I have now done in this simple test case: http://jsfiddle.net/headchem/r28mm/14/ Pseudo code for every frame: function drawFrame() { // clear global vertex[] array containing both position and color // recreate it with new triangles and colors (determined elsewhere) drawShapes(); // put the vertex array into the VBO using gl.bufferData // finish with a single call to gl.drawArrays(gl.TRIANGLES, 0, numItems); render(); } I know there is no silver

Will IE9 support WebGL and/or WebSockets? [closed]

。_饼干妹妹 提交于 2019-12-05 15:36:05
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 7 years ago . Will IE9 support WebGL and/or WebSockets? 回答1: Most answers to the question "When will browser X support HTML5 feature Y?" are answered by When Can I Use

How to reduce draw calls in OpenGL/WebGL

折月煮酒 提交于 2019-12-05 15:13:21
When i read about performance in OpenGL/WebGL, i almost hear about reducing the draw calls. So my problem is that i am using only 4 vertices to draw a textured quad. This means generally my vbo contains only 4 vertices. Basically gl.bindBuffer(gl.ARRAY_BUFFER,vbo); gl.uniformMatrix4fv(matrixLocation, false, modelMatrix); gl.drawArrays(gl.TRIANGLE_FAN,0, vertices.length/3); And here comes the problem i see. Before drawing i update the modelmatrix of the current quad. For example to move it 5 units along the y axis. So what i have to: gl.bindBuffer(gl.ARRAY_BUFFER,vbo); gl.uniformMatrix4fv

Three.js using WebRTC and applying a Shader

强颜欢笑 提交于 2019-12-05 15:12:55
I can't figure out how to apply a shader to a three.js object that has a video texture. I've been playing around with webRTC and three.js and successfully mapped a video texture onto a mesh using a standard material: var material = new THREE.MeshBasicMaterial({ color : 0xffffff, map : videoTexture }); I want to take it one step further by applying a shader (for this example a sobel shader) to this texture. My attempt is here: http://jsfiddle.net/xkpsE/1/ I'm receiving a bunch of INVALID_OPERATION warnings, but am having trouble understanding how to debug the issue. I also haven't seen anyone