shader

OpenGL ES 1.x Shaders

你。 提交于 2019-12-01 05:54:53
I am trying to find examples of how to implement a simple shader for OpenGL ES 1.x (specifically for the iPhone). I have never worked with shaders before, but I do understand what they are used for. I think that once I am able to load a simple shader in the simulator I will be able to take it from there and do what I need to do. Thanks for the help, ~Eric The iPhone currently uses OpenGL ES 1.1 which doesn't support a programmable pipeline. OpenGL ES 2.0 does seem to have them though and also be not compatible with 1.1 . From this post : The pixel shader of the iP* platform is programmed via

Why isn't this orthographic vertex shader producing the correct answer?

半世苍凉 提交于 2019-12-01 05:23:59
问题 My issue is that I have a (working) orthographic vertex and fragment shader pair that allow me to specify center X and Y of a sprite via 'translateX' and 'translateY' uniforms being passed in. I multiply by a projectionMatrix that is hardcoded and works great. Everything works as far as orthographic operation. My incoming geometry to this shader is based around 0, 0, 0 as its center point. I want to now figure out what that center point (0, 0, 0 in local coordinate space) becomes after the

Unity application crashes on iOS due to shader not compiled

回眸只為那壹抹淺笑 提交于 2019-12-01 05:22:40
I am trying to build my Unity 5.4.2f2 application for iOS. It is done with no compile errors. But when I try to run the application using Xcode 8.0, it immediately crashes and the debugger reports the following error. Initialize engine version: 5.4.2f2 (b7e030c65c9b) -------- Shader compilation failed #version 100 #extension GL_EXT_frag_depth : enable precision highp float; uniform highp vec4 _ProjectionParams; uniform highp vec4 _ZBufferParams; uniform highp mat4 unity_CameraToWorld; uniform highp mat4 _NonJitteredVP; uniform highp mat4 _PreviousVP; uniform highp sampler2D _CameraDepthTexture

Run on buffer object and change it's data by shader? [closed]

空扰寡人 提交于 2019-12-01 04:56:56
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Is there a way to run a shader on Buffer Object and modifying it with some other data with shader? In other words: Is there a way to

Ambient occlusion in threejs

天涯浪子 提交于 2019-12-01 03:38:39
I've just finished porting of my first cloth simulation from opengl to webgl using three.js (can be seen here) . The thing is it looks a bit dull, and I want to add (as i hope i remember correctly from my computer graphics classes) ambient occlusion, to make the cloth nicely shaded on collision with ball. My knowledge about shaders is now on very low level, so I'd be very thankful for any resources on this topic helpful with three.js development (tutorials, book titles etc), because googles doesn't know anything about it. Maybe some hints how to apply ambient occlusion? So the shading is fixed

OpenGL ES 1.x Shaders

一曲冷凌霜 提交于 2019-12-01 03:26:29
问题 I am trying to find examples of how to implement a simple shader for OpenGL ES 1.x (specifically for the iPhone). I have never worked with shaders before, but I do understand what they are used for. I think that once I am able to load a simple shader in the simulator I will be able to take it from there and do what I need to do. Thanks for the help, ~Eric 回答1: The iPhone currently uses OpenGL ES 1.1 which doesn't support a programmable pipeline. OpenGL ES 2.0 does seem to have them though and

glCreateShader and glCreateProgram fail on android

北城以北 提交于 2019-12-01 02:57:28
I'm having a very difficult problem creating a shader program on android. when I call glCreateShader or glCreateProgram each always returns 0. I've covered all my bases with regards to troubleshooting: I checked to make sure I had an ogl context (I do, i tested this by clearing the frame buffer with various colors, which worked). I tried glGetError but it returned nothing (GL_NO_ERROR) I'm not an opengl or android expert so I don't know of any thing else that could be causing this. I've been running my app on a nexus 7 tablet and I use OpenGL ES 2.0, and I target the latest version of Android

Unity application crashes on iOS due to shader not compiled

三世轮回 提交于 2019-12-01 02:28:32
问题 I am trying to build my Unity 5.4.2f2 application for iOS. It is done with no compile errors. But when I try to run the application using Xcode 8.0, it immediately crashes and the debugger reports the following error. Initialize engine version: 5.4.2f2 (b7e030c65c9b) -------- Shader compilation failed #version 100 #extension GL_EXT_frag_depth : enable precision highp float; uniform highp vec4 _ProjectionParams; uniform highp vec4 _ZBufferParams; uniform highp mat4 unity_CameraToWorld; uniform

Pointers on modern OpenGL shadow cubemapping?

女生的网名这么多〃 提交于 2019-12-01 02:22:05
Background I am working on a 3D game using C++ and modern OpenGL (3.3). I am now working on the lighting and shadow rendering, and I've successfully implemented directional shadow mapping. After reading over the requirements for the game I have decided that I'd be needing point light shadow mapping. After doing some research, I discovered that to do omnidirectional shadow mapping I will do something similar to directional shadow mapping, but with a cubemap instead. I have no previous knowledge of cubemaps but my understanding of them is that a cubemap is six textures, seamlessly attached. I

Render “hard” edges using custom shader

China☆狼群 提交于 2019-12-01 01:14:22
I'd like to reproduce the effect created by using THREE.EdgesHelper (drawing a boundary on "hard" object edges), but using a custom shader rather than adding a separate THREE.Line object. Essentially I'd like to do what's done in this demo , but only for the "hard" boundaries; e.g. boundaries that are not between two coplanar faces Approach: apply similar routine to EdgesHelper , but mark vertices that are in hard edges with a custom attribute (e.g. isEdge ); probably need to use BufferGeometry , since regular Geometry allows re-use of vertices in multiple faces, but BufferGeometry duplicates