Tag Info

New answers tagged

1

Well, you have it easy. There's only a few hundred models available, with probably a few dozen representative configurations. It's not like most people build their own smartphones, like with custom PCs where you can have trillions of different configurations. There's no way around this. Drivers are buggy, and you can either complain or act on that. ...


1

I think you can convert it manually by manipulating the bytes yourself. vec4 bytes = ivec4(col * 255); uint integerValue = (bytes.r << 24) | (bytes.g << 16) | (bytes.b << 8) | (bytes.a) The code is untested, but the basic idea is to convert your normalized RGBA colors (0-1) into 0-255, and shifting them appropriately and OR-ing the bytes ...


1

Shaders are heavily optimized for floating point, not integer math. The four values you will get are your RGBA values, each from 0 to 1. That's what the texture is meant to represent, and that's what you'll get. If you need to convert these four values to one larger value, you are more than welcome to do something like highp float encoded = (sampled.a * ...


0

I think I found answer. I inattentively read article. "Next, we map xp and yp to xn and yn of NDC with linear relationship." So, xn is linear function from xp. (http://www.mathsisfun.com/algebra/linear-equations.html) And goal is find value of xn in [-1, 1] range. Anyway I didn't understand how author find bottom projection row W (0,0,-1,0).



Top 50 recent answers are included