Revision c6e8a00 by Mike Erwin April 17, 2017, 08:01 (GMT) |
Gawain: fix for last commit Follow-up to 3bc6b831d82724578fc8150d863b54f334db2bf4 Initial code was getting the number of ShaderInterfaces that could fit between two pointers (which makes no sense). I really meant number of bytes. Surprised it worked on Mac, glad I tested on Windows before bed :D |
Revision 3bc6b83 by Mike Erwin April 17, 2017, 05:45 (GMT) |
Gawain: shrink ShaderInterface name buffer ShaderInterface stores names of custom uniforms and all attributes in an internal buffer, but it doesn't know how large to make this buffer until all inputs are scanned. This commit shrinks the buffer to the exact size needed. |
Revision b3e38cf by Mike Erwin April 17, 2017, 05:19 (GMT) |
Gawain: look up uniforms by name quicker ShaderInterface_uniform searches custom uniforms first, then builtin uniforms if needed. This reduces the amount of string matching since you're almost certainly looking for one of those custom uniforms. Otherwise you would've called ShaderInterface_**builtin**_uniform. |
Revision 57d3117 by Germano Cavalcante April 16, 2017, 21:50 (GMT) |
Object.raycast: more minor improvements ... - if it is to check a bool, let it be local; - removes gotos; |
Revision 47e0d2b by Mike Erwin April 16, 2017, 19:11 (GMT) |
OpenGL: tweak GPU_texture_create_nD - test for 2D textures first since it's the most common case - declare variables close to where they're used - fix compiler warning for proxy (uninitialized use) - safe return if n != 1, 2, 3 (should never happen) - white space |
Revision 8dcf7a4 by Mike Erwin April 16, 2017, 19:04 (GMT) |
OpenGL: fix GPU_SHADER_SIMPLE_LIGHTING_SMOOTH_COLOR The fragment shader expects a normal, but the vertex shader was not providing one. Fix: added a new vertex shader that has normals + smooth color interpolation. I also split gpu_shader_3D_vert in two: - one with just position - one with position + normal For each of the builtin shaders, we should be able to look at the GLSL and tell exactly what it's doing. Using #defines and #ifdefs for rendering options makes the shaders hard to read and easy to break. |
Revision 6a2c823 by Mike Erwin April 16, 2017, 17:57 (GMT) |
fix mistake from last commit I didn't build this BGE-related code before pushing. My bad! fix for af61b5eb0c1bef93e8df1434b174944e2b40445d |
Revision af61b5e by Mike Erwin April 16, 2017, 17:44 (GMT) |
cleanup use of immUniformColor - use best function for the job - don't specify alpha if 100% - 'f' for floating point literals |
Revision ae07130 by Mike Erwin April 16, 2017, 17:33 (GMT) |
Gawain: add immUniformColor3ubvAlpha Convenience function for specifying colors with separate RGB and alpha. Alpha ranges from 0 to 255. |
Revision 7041b99 by Mike Erwin April 16, 2017, 16:25 (GMT) |
use immUniformColor instead of immUniform("color" The specialized color functions are better in every way: - faster lookup (don't have to match "color" string) - flexible inputs (RGB with separate alpha) - automatic alpha = 1.0 if not specified Sort of related to T49043 |
Revision 1521565 by Antonio Vazquez April 16, 2017, 15:52 (GMT) |
Revision bf441fc by Mike Erwin April 16, 2017, 15:21 (GMT) |
Gawain: move AttribBinding funcs to private interface Other parts of Gawain uses these internally, but they're not part of the public API. Part of T51219 |
Revision 4a41bc8 by Mike Erwin April 16, 2017, 15:08 (GMT) |
Gawain: fix compiler warnings vertex_format.c implements both public and private functions, so needs to include the private header. Follow-up to 7c57ca5109793c54f34adfd396c41b1be163d61f |
Revision 3024949 by Mike Erwin April 16, 2017, 15:00 (GMT) |
Gawain: fix compilation on MSVC 2013 attrib_binding.c uses NULL, so include stddef. Also swapped stdlib for stddef in vertex_format.c, since it only needs NULL. Not sure why MSVC 2017 and clang/Mac work without this... Thanks to @youle for reporting! |
Revision 888e742 by Mike Erwin April 15, 2017, 23:43 (GMT) |
OpenGL: minor cleanup & TODO Just clearing out some old git stashes. No point getting old GL light model to work on old Intel GPUs (both are obsolete for 2.8) |
Revision da17928 by Mike Erwin April 15, 2017, 23:19 (GMT) |
Gawain: look up builtin uniforms by enum, not by name This speeds up color and transformation matrix lookups at draw time (used by almost all shaders). |
Revision abd1934 by Mike Erwin April 15, 2017, 22:06 (GMT) |
Gawain: use ShaderInterface to manage vertex attribs This eliminates tons of glGetAttribLocation calls from the drawing loop. Vast majority of code can keep making the same function calls. They're just faster now! |
Revision 2593ce9 by Mike Erwin April 15, 2017, 21:07 (GMT) |
Gawain: remove 2D matrix uniforms from ShaderInterface - remove 2D-specific variants of BuiltinUniform enum - rename remaining builtins to exclude "_3D" since they can be used by 2D or 3D shaders Follow up to D2626 |
Revision ea105ba by Mike Erwin April 15, 2017, 19:42 (GMT) |
Gawain: fix header comments Missed this when splitting VertexBuffer from Batch -- they used to live in the same file. |
Revision 7c57ca5 by Mike Erwin April 15, 2017, 17:10 (GMT) |
Gawain: move some VertexFormat funcs to private interface Other parts of Gawain uses these internally, but they're not part of the public API. Part of T51219 |
|
|
|


Master Commits
MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021