summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Tim Allen [Sun, 31 Mar 2013 01:41:44 +0000 (12:41 +1100)]
Add filter="nearest" to some old shaders that need it.
Tim Allen [Mon, 26 Nov 2012 13:27:53 +0000 (00:27 +1100)]
Fix typo in SABR shader
Tim Allen [Thu, 22 Nov 2012 10:45:33 +0000 (21:45 +1100)]
Update to SABR v3.0.
joshuass says:
Been busy working on a way to remove the final bits of branching
(assuming the built in step function isn't a branch itself).
I removed the branching by calculating a set of booleans for each
interpolation result at the four corners in a way that only allows
a corner to have one of its interpolation values be true.
Then, by casting, I can multiply and sum all the interpolation
amounts and rules in a single pass rather than using the if/else and
ternary statements.
Finally, to get rid of the final artifacts due to using all corners
to determine a texel's color, I am calculating the values twice. One
time by going counter clockwise, and one time going clockwise. Then
I select the value that is the furthest from the texel's original
value through a step/mix function combination.
It works incredibly well! I just hope that it also makes it
speedier.
Tim Allen [Tue, 13 Nov 2012 10:34:14 +0000 (21:34 +1100)]
Updated to v1.1 of the SABR shader.
The author says:
Spent my lunch looking over the shader to reduce the branching.
I've managed to remove almost all the branching except for
determining what mix rate should be used. Haven't figured out a way
to remove that yet...
With the branching removed, the OpenGL version compiles considerably
faster.
Tim Allen [Sun, 11 Nov 2012 23:05:27 +0000 (10:05 +1100)]
Update the SABR shader.
I read a little further in the thread and discovered an updated version
of the SABR shader:
"Thanks to screwtape's sharp eyes I was able to adjust weighting and
threshold values to prevent the curve flattening he described."
From:
http://board.byuu.org/viewtopic.php?p=76944#p76944
Tim Allen [Sun, 11 Nov 2012 22:42:45 +0000 (09:42 +1100)]
Added SABR shader by Joshua Street.
This is based on Hyllian's 5xBR shader, but adds anti-aliasing, as
described here:
http://board.byuu.org/viewtopic.php?f=3&t=3416
Tim Allen [Sun, 23 Sep 2012 08:31:09 +0000 (18:31 +1000)]
Always create power-of-two sized textures.
As well as being more compatible, this also helps shaders that use
floating-point coordinates produce more stable results.
Tim Allen [Sat, 22 Sep 2012 10:45:00 +0000 (20:45 +1000)]
Move CRT-interlaced-halation shader out of v1.1.
It uses RetroArch features that aren't in the v1.1 spec, so I've moved
it to a v1.2 directory.
Tim Allen [Tue, 18 Sep 2012 11:52:06 +0000 (21:52 +1000)]
Fix tabs in test shader.
Tim Allen [Tue, 18 Sep 2012 11:51:43 +0000 (21:51 +1000)]
Add a test for texture-clamping to the test shader.
Tim Allen [Sat, 15 Sep 2012 14:50:54 +0000 (00:50 +1000)]
Add cgwg's NTSC artifact shader.
This is the shader that inspired many of the features of the v1.1 shader
spec, including multiple passes and the rubyFrameCount uniform.
Tim Allen [Sat, 15 Sep 2012 10:50:24 +0000 (20:50 +1000)]
Add some sample textures to display.
Tim Allen [Sat, 15 Sep 2012 09:28:40 +0000 (19:28 +1000)]
Sort the texture list.
At least now we should have test-patterns occur in a predictable order.
Tim Allen [Sat, 8 Sep 2012 10:30:24 +0000 (20:30 +1000)]
Refactor uniform-setting some more.
Tim Allen [Sat, 8 Sep 2012 09:00:58 +0000 (19:00 +1000)]
Have a fixed default texture filter method.
The XML shader spec says this can be implementation defined; we might as
well define it consistently.
Tim Allen [Sat, 8 Sep 2012 08:51:11 +0000 (18:51 +1000)]
Add support for the final 'implicit pass'.
This is the thing where if the last pass of a shader doesn't set
a specific output size we render it straight to the screen, but if it
does then we have to render to another framebuffer object, then render
*that* to the screen without any shader at all.
This also includes some refactoring; the 'draw texture to screen'
and 'draw texture to framebufferobject' methods both involved binding
a texture, setting a filter, then drawing a textured quad, so that was
broken out into a helper function.
Tim Allen [Fri, 7 Sep 2012 11:46:21 +0000 (21:46 +1000)]
Manually delete textures at shutdown.
This means we won't get annoying "ignored exception in __del__" messages
when we quit.
Tim Allen [Sat, 15 Sep 2012 08:24:22 +0000 (18:24 +1000)]
Create textures with full-alpha.
Tim Allen [Fri, 7 Sep 2012 11:35:13 +0000 (21:35 +1000)]
Move "create GL texture" logic into texreader.py
This makes it match how shaderreader.py works.
Tim Allen [Fri, 7 Sep 2012 11:21:45 +0000 (21:21 +1000)]
Simplify texreader.parse_ppm()
We don't *really* need a complicated state-based parser for PPM files
when we can just use str.split().
I guess this might be a problem if a PPM begins with a byte
that happens to be a whitespace character, but if that happens at least
the code will raise an exception.
Tim Allen [Wed, 5 Sep 2012 14:03:59 +0000 (00:03 +1000)]
Add basic multipass support.
Now we can render all the passes defined in a shader file, and we even
get the texture coordinates of each pass the right way round. As part of
this. I added a Texture class that groups the texture ID, width and
height into a single class, so _render_pass() can return all the
information about the new texture instead of passing tuples around
everywhere.
Still need to handle the special-casing the spec calls an "implicit
pass".
Tim Allen [Tue, 4 Sep 2012 13:34:31 +0000 (23:34 +1000)]
First draft of XML Shader reference implementation.
Known problems include:
- Only renders first pass.
- Always renders at input resolution then scales up.
- Currently renders the output right-side-up, but only through
brute-force changing numbers at random. Need to figure out what the
hell is going on here.
Apart from those, it all seems to be working pretty fluidly.
Tim Allen [Fri, 7 Sep 2012 10:58:33 +0000 (20:58 +1000)]
Ignore Python droppings.
Tim Allen [Wed, 5 Sep 2012 13:45:52 +0000 (23:45 +1000)]
A shader for testing multipass implementations.
Tim Allen [Wed, 29 Aug 2012 23:13:30 +0000 (09:13 +1000)]
Add Pixellate-scanlines combo shader.
Posted by hunterk here:
http://board.byuu.org/viewtopic.php?p=72130#p72130
Tim Allen [Sat, 16 Jun 2012 13:38:43 +0000 (23:38 +1000)]
Fix typo in comment.
Tim Allen [Sun, 1 Apr 2012 12:13:33 +0000 (22:13 +1000)]
Fix the licensing link for Pixellate.
Looks like I copy/pasted the wrong URL. D'oh!
Tim Allen [Tue, 27 Mar 2012 10:45:41 +0000 (21:45 +1100)]
Update to 5xBR v3.7 shaders.
It has been pointed out to me that it is actually useful to have all
three variants of the 5xBR shader, so I've included them under
descriptive names rather than their original filenames:
5xBR v3.7a -> 5xBR Rounded
5xBR v3.7b -> 5xBR Semi-Rounded
5xBR v3.7c -> 5xBR Squared
From this thread on the bsnes forums:
http://board.byuu.org/viewtopic.php?p=59514#p59514
Tim Allen [Tue, 6 Mar 2012 10:36:08 +0000 (21:36 +1100)]
Updates to the Pixellate shader.
A faster version of the GLSL version, and a matching HLSL port.
From this forum thread:
http://board.byuu.org/viewtopic.php?p=57250#p57250
Tim Allen [Sat, 3 Mar 2012 13:13:27 +0000 (00:13 +1100)]
5xBR: Don't shrink single dark pixels.
This makes sure that single dark pixels (such as Yoshi's eyes in Super
Mario World, or the spikes on the Pokeys) aren't 'eaten up' by
surrounding brighter colours.
Tim Allen [Sat, 3 Mar 2012 09:23:59 +0000 (20:23 +1100)]
Credit crazy46guy for the GLSL conversion of 5xBR
Tim Allen [Thu, 1 Mar 2012 13:23:14 +0000 (00:23 +1100)]
A GLSL version of Hyllian's 5xBR shader.
Posted to the bsnes forums in this thread:
http://board.byuu.org/viewtopic.php?f=3&t=2512
Hyllian's original Cg shader is available here:
https://github.com/twinaphex/common-shaders/blob/master/xBR/5xBR-v3.5a.cg
Tim Allen [Thu, 9 Feb 2012 12:46:21 +0000 (23:46 +1100)]
Remove support for bsnes v083 shaders.
As of version v085 (maybe v084), bsnes supports the traditional XML
format for shaders once again, so the special translation scripts are no
longer necessary.
Tim Allen [Thu, 9 Feb 2012 12:38:55 +0000 (23:38 +1100)]
Updated the interlaced version of the CRT shader.
Also, there's now a 'halation' version of the CRT-interlaced shader,
which adds a subtle glow around bright parts of the screen, much like
a genuine CRT does.
From this post by hunterk on the bsnes forums:
http://board.byuu.org/viewtopic.php?p=54531#p54531
Tim Allen [Sat, 4 Feb 2012 09:27:24 +0000 (20:27 +1100)]
New version of the CRT shader from cgwg.
Changelog:
- More accurate geometry for simulating a spherically curved CRT. Now
controlled by two parameters: radius of curvature and distance of
viewer from screen.
- Tilting of the simulated screen.
- Hard border and rounded corners.
- Adjustable overscan.
- Moved most of the parameters to the vertex shader file. See the
comments at the start of the main function. There are still a few
#defines that can be toggled in the fragment shader files.
- 3x oversampling of the beam profile. Reduces Moiré patterning at small
output sizes. This has probably the biggest impact on performance, and
should be disabled if things become sluggish.
As discussed in this thread:
http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=74575#Post74575
Tim Allen [Fri, 21 Oct 2011 11:35:36 +0000 (22:35 +1100)]
A CRT shader that handles interlaced video.
This is a slight modification of shaders/OpenGL/v1.0/CRT.shader that
detects when it's being fed an interlaced video frame, and only displays
the odd or even fields as appropriate. This provides more authentic and
natural rendering of interlaced frames, but requires features from the
v1.1 spec so it can't just replace the original CRT shader.
The original modification was done by cgwg here:
http://board.byuu.org/viewtopic.php?p=41966#p41966
...and rebased onto the latest version of the CRT shader by hunterk:
http://board.byuu.org/viewtopic.php?p=47087#p47087
Tim Allen [Thu, 20 Oct 2011 10:44:33 +0000 (21:44 +1100)]
Add HQ4x shader.
This shader was originally written for Pete's OpenGL plugin (a video
renderer for Playstation emulators), and converted to an XML shader file
by hunterk in this post:
http://board.byuu.org/viewtopic.php?p=47099#p47099
Tim Allen [Fri, 14 Oct 2011 11:01:50 +0000 (22:01 +1100)]
Apply filter settings from bsnes v083 shaders.
This makes these shaders work properly with bsnes v083, as well as
XML Shader Format v1.1-compatible host applications.
Tim Allen [Fri, 14 Oct 2011 10:00:06 +0000 (21:00 +1100)]
Quilez shader requires linear filtering.
The 'filter' attribute isn't strictly compatible with version 1.0 of the
XML shader spec, but it doesn't hurt... and versions of bsnes that don't
support 'filter' let you toggle it manually in the menus anyway.
Tim Allen [Wed, 5 Oct 2011 12:19:07 +0000 (23:19 +1100)]
A tool to make a set of shaders for bsnes v083.
bsnes v083 only understands shaders in the new "BML" format, which is
still in flux, and does not perfectly align with the XML document model.
I've included an XSLT script which seems to transform XML shaders into
a format acceptable to bsnes v082r30; we'll see if it still works with
bsnes v083 final.
Tim Allen [Tue, 4 Oct 2011 12:42:38 +0000 (23:42 +1100)]
A tool to make a set of shaders for bsnes v082.
Actually, this set should work for any version of bsnes that supports
XML shaders. Very old versions don't actually require the target
(Direct3D or OpenGL) in the filename, but it doesn't hurt.
Tim Allen [Tue, 4 Oct 2011 12:09:22 +0000 (23:09 +1100)]
Copied XML shaders from my bsnes repository.
bsnes v083 changes the supported shader format from the traditional XML
format to a new markup format. Therefore, there's not much point keeping
shaders in XML format in the bsnes repository.