![]() ![]() > Minor query: shouldn't the shader take a 561x192 image as input in order to be fully accurate? Wouldn't a single high-resolution image with a final column that had the 90-degree phase shift bit end up pushing a pixel out into what is ordinarily the right border? On Wednesday, at 3:50:25 PM UTC-4, Thomas Harte wrote: Just because some GLSL compilers aren't that intelligent but all GPUs are very good at vectors. (ii) much more minor, consider reformulating as a dot product if you can rather than a manual accumulation. So in your case you'd end up reducing c1 to c8 to just c1 to c4, but the 1.0/ 2.0/ etc would now need to be uniforms rather than literals.Īlso, always try to do any steps that apply a fixed offset to a varying in the vertex shader rather than the fragment shader because that allows most GPUs to queue up sampling results a lot more easily. Then another way of getting exactly the same result is v = ((c1/(c1+c2))*v + (c2/(c1+c2))*v) * (c1+c2).Īs (c1+c2)/(c1+c2) = 1, you can do the inner bit in a single sampling:īecause the rule for bilinear filtering is that the pixel at, say, 1.8 is the pixel at location 1 multiplied by 0.2 plus the pixel at location 2 multiplied by 0.8. Simplify notationally to c += v, where v = c1*v + c2*v. You might want to change the title on Line 5 of index.html -) The remaining challenge is to find a good compromise between sharpness, color accuracy, smoothness, and "solid colors" - which are kind of contradictory goals - but everyone has their own set of "preferences" for Authenticity vs Readability. :-/ On AppleWin we have pretty good color accuracy but still have a tad of blurriness.) JACE (Love the color accuracy, don't care the extreme blurriness. Unfortunately, they tend to blur the image out to the point of eye strain. Interesting hack of using back-tick for multi-line code BTW!Īny chance you can allow us to pick a few different test images? While DHGR is interesting and allįor a while now we've had accurate colors in various emulators. ![]() (*) Technically the secret sauce is the 8 magic constants: c0, c1, c2, c3, c4, c5, c6, c7, c8Ĭ += pixels(q, 1.0 / textureSize.x) * c1 Ĭ += pixels(q, 2.0 / textureSize.x) * c2 Ĭ += pixels(q, 3.0 / textureSize.x) * c3 Ĭ += pixels(q, 4.0 / textureSize.x) * c4 Ĭ += pixels(q, 5.0 / textureSize.x) * c5 Ĭ += pixels(q, 6.0 / textureSize.x) * c6 Ĭ += pixels(q, 7.0 / textureSize.x) * c7 Ĭ += pixels(q, 8.0 / textureSize.x) * c8 and runs the secret sauce (*) "COMPOSITE_SHADER" to turn it into a proper chroma/luma signal -> RGB. I've been meaning to throw Marc Ressl shader code into ShaderToy and reverse engineering for a while but keep getting distracted by other projects. Nice work! I'm an WebGL expert and am impressed with the fine level of controls. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |