Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-12-11Fix T46951: GLSL draw mode missing some textures.Brecht Van Lommel
2015-12-08OpenGL: split off framebuffer, shader and texture code into separate files.Brecht Van Lommel
2015-11-25Fix OpenSubdiv geometry shader error on Linux / AMD.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D1638
2015-11-23OpenGL: codegen formattingMike Erwin
Formatting of generated GLSL code: - attribute/varying for version 120 - in/out for version 130+ - minor cosmetic stuff Tested working on Windows 10, GL 4.3.
2015-09-16Fix T46128: High Quality DoF brokenSergey Sharybin
The issue was caused by some special tricks needed to compile OpenSubdiv shader which was using stupid check whether geometry shader is used or not. Now made it more explicit call whether special OpenSubdiv trickery is needed or not. Its not ideal solution, but it's not really easy to do a proper solution for this, because while we can do half of the work with if-defs in the shader code but we'll still need to somewhat define layout of the input blocks which isn't really doable with current shader version we're using.
2015-09-04Quiet warningsJulian Eisel
We had too many warnings lately... was awaiting that someone would kill them - didn't happen -> goes to my commit ratio! :P
2015-08-25OpenSubdiv: Fix/workaround shader compilation when going to GLSL modeSergey Sharybin
2015-07-20OpenSubdiv: Commit of OpenSubdiv integration into BlenderSergey Sharybin
This commit contains all the remained parts needed for initial integration of OpenSubdiv into Blender's subdivision surface code. Includes both GPU and CPU backends which works in the following way: - When SubSurf modifier is the last in the modifiers stack then GPU pipeline of OpenSubdiv is used, making viewport performance as fast as possible. This also requires graphscard with GLSL 1.5 support. If this requirement is not met, then no GPU pipeline is used at all. - If SubSurf is not a last modifier or if DerivesMesh is being evaluated for rendering then CPU limit evaluation API from OpenSubdiv is used. This only replaces the legacy evaluation code from CCGSubSurf_legacy, but keeps CCG structures exactly the same as they used to be for ages now. This integration is fully covered with ifdef and not enabled by default because there are several TODOs to be solved first: - Face varying data interpolation is not really cleanly implemented for GPU in OpenSubdiv 3.0. It is also not implemented for limit evaluation API. This basically means we'll have really hard time supporting UVs. - Limit evaluation only works with adaptivly subdivided meshes so far, which basically means all the points of CCG are pushed to the limit. This gives different result from old code. - There are some serious optimizations possible on the topology refiner creation, which would speed up initial OpenSubdiv mesh creation. - There are some hardcoded asumptions in the GPU and DerivedMesh areas which could be generalized. That's something where Antony and Campbell can help, making it so the code is structured in a way which is reusable by all planned viewport projects. - There are also some workarounds in the dependency graph to make sure OpenGL buffers are only freed from the main thread. Those who'll be wanting to make experiments with this code should grab dev branch (NOT master) from https://github.com/Nazg-Gul/OpenSubdiv/tree/dev There are some patches applied in there which we're working on on getting into upstream.
2015-07-14Particle Info node support for GLSL mode and the internal render.Alexander Romanov
With this patch "Particle Info" node from Cycles works in GLSL and BI Alexander (Blend4Web Team) Reviewers: psy-fi Note: moved particle info to object render instance instead of shadeinput during review - Antony. Differential Revision: https://developer.blender.org/D1313
2015-06-23Cleanup: styleCampbell Barton
2015-06-17Cleanup: styleCampbell Barton
2015-05-19Fix T44755 set_value node output in node tree not properly converted toAntony Riakiotakis
color in GLSL Issue here is that intermediate result was clipped as an optimization in such nodes and thus not converted to the correct type properly. Now only clip those values if types match. This keeps both the optimization and the conversion. I looked at converting uniform types always but it's more involved to compare types at conversion time for such links because the type was getting overridden during link duplication.
2015-05-17Fix T44713: GLSL and BI inconsistency converting color to float node socket.Brecht Van Lommel
2015-05-12BGE: Adding material IPO support to GLSL materialsMitchell Stokes
Most of this patch was created by Daniel Stokes, I'm mostly just cleaning it up and testing it. Still todo: hardness. I need to figure out how to handle the integer -> float conversion on a dynamic uniform. Reviewers: psy-fi, brecht Reviewed By: psy-fi Subscribers: psy-fi Differential Revision: https://developer.blender.org/D511
2015-03-23cleanup: use spaces for alignmentMike Erwin
while studying GPU lib
2015-03-20Fix high quality depth of field on the Mac.Antony Riakiotakis
Quite a few things wrong here: * Mac did not support EXT_draw_instanced, only ARB_draw_instanced * Draw instanced did not work unless data came from vertex buffer, which is second time we see weird things with vertex arrays in mac * There were a few stupid mistakes by me as well, such as binding to uniform locations for the wrong shaders (it's a wonder it ever worked :p)
2015-03-19Depth of field high quality:Antony Riakiotakis
A new checkbox "High quality" is provided in camera settings to enable this. This creates a depth of field that is much closer to the rendered result and even supports aperture blades in the effect, but it's more expensive too. There are optimizations to do here since the technique is very fill rate heavy. People, be careful, this -can- lock up your screen if depth of field blurring is too extreme. Technical details: This uses geometry shaders + instancing and is an adaptation of techniques gathered from http://bartwronski.com/2014/04/07/bokeh-depth-of-field-going-insane- http://advances.realtimerendering.com/s2011/SousaSchulzKazyan%20- %20in%20Real-Time%20Rendering%20Course).ppt TODOs: * Support dithering to minimize banding. * Optimize fill rate in geometry shader.
2015-03-17Cleanup: bool & constMike Erwin
Using bool when we're asking yes/no questions such as whether some GPU feature is supported. Consolidated these simple functions into gpu_extensions.c and grouped them in the header. Const-ified some args where the functions don't modify the pointed-to data.
2015-02-23Debug GPU functionality from soc-viewport_fx by Jason WilkinsAntony Riakiotakis
patch number D706 with changes: - WITH_GPU_DEBUG just creates a debug context (and enables the debug messaging system functions) but leaves the checks we had intact. Old patch added the debug functionality only if we had the flag on to save some performance. Rationale here is that we might not want to recompile blender just to get the extra information, and having users start blender with a -d flag to get the extra information is also useful for bug reports. Those checks already existed and most expensive ones are hidden behind a debug mode check so performance should not be that bad. - Did some cleanup of existing functionality: When things go wrong blender side, just print the error, don't check for GL errors first. - Did not port changes needed for GLES to regular glew.h - Got rid of duplicate or very similar new functionality. Generally, code is more moving things around/cleanup and should work exactly as before apart from the debug context, so it's safe to add even now. It also provides a nice substitute function for glu error descriptions
2015-02-12Viewport compositing - first codeAntony Riakiotakis
This commit introduces a few ready made effects for the 3D viewport and OpenGL rendering. Included effects are Depth of Field, accessible from camera view and screen space ambient occlusion. Those effects can be turned on and tweaked from the shading panel in the 3D viewport. Off screen rendering will use the settings of the current camera. WIP documentation can be found here: http://wiki.blender.org/index.php/User:Psy-Fi/Framebuffer_Post-processing
2015-02-02Adjust GLSL drawing of window coordinates from camera view (use cameraAntony Riakiotakis
bounds instead of window bounds). Fixes remaining part of T43346
2015-01-26Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).Bastien Montagne
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)' and 'strcmp(foo, bar) == 0' in several places...
2015-01-26Code cleanup: de-duplicate codegen texid assignmentNicholas Bishop
Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1026
2015-01-26Code cleanup: use GPUDynamicType instead of intNicholas Bishop
Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1026
2015-01-26Code cleanup: use bool instead of intNicholas Bishop
Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1026
2015-01-26Code cleanup: use an enum for GPUNodeLink.imageNicholas Bishop
Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1026
2015-01-26Code cleanup: use enums instead of definesNicholas Bishop
Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1026
2015-01-26Code cleanup: move struct GPUFunction and related code out of headerNicholas Bishop
Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1026
2015-01-26Code cleanup: use lowercase "gpu" prefix for static functionsNicholas Bishop
Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1026
2015-01-26Code cleanup: remove do-nothing function `GPU_node_end`Nicholas Bishop
Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1026
2015-01-26Code cleanup: remove some `UNUSED` parameters from static functionsNicholas Bishop
Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1026
2015-01-26Code cleanup: retype various fields/parameters from int to GPUTypeNicholas Bishop
Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1026
2015-01-26Code cleanup: remove parameter from GPU_node_link_create()Nicholas Bishop
In all but one call the value 0 (aka GPU_NONE) was passed in. Clearer to just default to GPU_NONE and change the one caller that sets a real type to do it explicitly. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1026
2015-01-26Code cleanup: minor comment improvementsNicholas Bishop
Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1026
2015-01-26Code cleanup: give anomymous enum used for CustomData.type a nameNicholas Bishop
Used this in GPU module to clarify what some "ints" really are. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1026
2015-01-01cleanup: redundant casts & const cast correctnessCampbell Barton
2014-11-29Cleanup: unused headersCampbell Barton
2014-11-26World background working on cycle nodes.Antony Riakiotakis
This is added in the spirit of the general cycles GLSL system which is pretty much WIP still. This will only work on cycles at the moment but generating for blender internal is possible too of course though it will be done in a separate commit. This hasn't been tested with all and every node in cycles, but environment and regular textures with texture coordinates work. There is some difference between the way cycles treats some coordinates, which is in world space and the way GLSL treats them, which is in view space. We might want to explore and improve this further in the future. ...also </drumroll>
2014-10-21Simplify GLSL in bump mapping, use gl_NormalMatrix where appropriate.Antony Riakiotakis
tangents are directions and should be transformed like directions.
2014-10-08Ghost Context RefactorJason Wilkins
https://developer.blender.org/D643 Separates graphics context creation from window code in Ghost so that they can vary separately.
2014-08-29Fix T41596 GLSL error on ATIs after clipping workaround commit.Antony Riakiotakis
This was a little difficult to track down, basically it was a missing escape sequence that only manifested itself when GPU did not support bicubic filtering. Extra: * Fix memory leaks when an error occurs in shader compilation * Display full shader when a compilation error occurs. Makes it easier to diagnose if problem is caused by a syntax or compatibility error.
2014-07-19Defines: replace ELEM3-16 with ELEM(...), that can take varargsCampbell Barton
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-04-02Refactor to recent matcap built-ins to not use the built in system.Antony Riakiotakis
Those variables would get declared on fragment shader level and since we use reserved opengl variables, some compilers would throw an error (NVIDIA allows, some ATI compilers may break). Instead, use a separate opengl built-in category especially for them. This works on NVIDIA, and will wait for tests of this commit from ATI users.
2014-04-01Make matcaps suck lessAntony Riakiotakis
This commit does various changes for matcaps: One is taking advantage of drawing with pbvh (which would only happen with dyntopo previously) and drawing with partial redraw during sculpting. The second one is support for masks. To make this work in the special case of multires, which uses flat shading, I use the only available flat shaded builtins in OpenGL 2.0 which are color and secondary color. Abusing colors in that way is also essential for flat shading to work if we are to use pbvh draw in multires, since it is the color that is being interpolated flatly, not the normal (which can only interpolated smoothly). The pbvh drawing code for multires used last triangle element's normal to compute the shading which would only produce smooth results. This could change if we did the shading in the vertex shader for flat shaded primitives, but this is more complex and makes it harder to have one shader to rule the mole. Also increased the brightness of the default diffuse color for sculpting. This should be useful since artists like to tweak the lighting settings and it will give them the full dynamic range of the lights, but also it helps with correct brightness of sculpted matcaps. Reviewers: brecht Differential Revision: https://developer.blender.org/D435
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2014-02-03Code cleanup: use bools where possibleCampbell Barton
2014-01-19Docs: doxygen file descriptions for BLF, GPU and WMCampbell Barton
2013-10-16style cleanupCampbell Barton
2013-08-27ghash/bli-listbase edits, rename BLI_ghash_pop -> BLI_ghash_popkey (since it ↵Campbell Barton
takes a key as an arg and isnt popping any element from the hash as you might expect). add BLI_pophead/tail, since getting the first element from a list and removing it is a common task.