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
2016-10-10OpenGL: remove GLSL support query (it's always supported)Mike Erwin
2016-01-27World textures displaying for viewport in BI.Alexander Romanov
This patch supports "Image or Movie" and "Environment map" types of world texture for the viewport. It supports: - "View", "AngMap" and "Equirectangular" types of mapping. - Different types of texture blending (according to BI world render). - Same color blending as when it lacked textures (but render via glsl). {F207734} {F207735} Example: {F275180} Original author: @valentin_b4w Regards, Alexander (Blend4Web Team). Reviewers: sergey, valentin_b4w, brecht, merwin Reviewed By: merwin Subscribers: campbellbarton, merwin, blueprintrandom, youle, a.romanov, yurikovelenov, AlexKowel, Evgeny_Rodygin Projects: #rendering, #opengl_gfx, #bf_blender:_next Differential Revision: https://developer.blender.org/D1414
2016-01-09Cleanup: style, gpu moduleCampbell Barton
2016-01-08OpenGL: fix max texture anisotropy checkMike Erwin
Query max supported on init, use that to clamp user-set values.
2015-12-08OpenGL: split off framebuffer, shader and texture code into separate files.Brecht Van Lommel
2015-12-08OpenGL: remove non-power-of-two texture check, where even ES 2.0 does not ↵Brecht Van Lommel
need it.
2015-12-07OpenGL: new GPU_legacy_support() functionMike Erwin
Is current context compatible with legacy GL (version 2.1)? My earlier approach -- checking for GLEW_ARB_compatibility -- was not enough. This should always return true if we set our GL context up properly. It will return false when we switch to core profile.
2015-11-24OpenGL: clean up use of old extensionsMike Erwin
2015-10-20New function to draw offscreen, and related API changesDalai Felinto
This expose the capability of handling offscreen drawing. The initial support lays the barebones for addons to work with framebuffer objects and implement 3d viewport offscreen drawing. This can be used by script writers to make fisheye lens preview, head mounted display support, ... The complete documentation is here: http://www.blender.org/api/blender_python_api_2_76_1/gpu.offscreen.html Review and many changes by Campbell Barton (thank you :) https://developer.blender.org/D1533
2015-10-14Support for multi-sample off-screen buffersCampbell Barton
Replaces much slower manual accumulation buffer which simply did multiple renders. Needs OpenGL3.2, otherwise multi-sample is disabled.
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-14Revert "Fix crash in opengl render caused..."Campbell Barton
This reverts commit d64b1221c67846bb954855a19c8dd093b83adc8e. While this prevents the crash, offscreen renders still aren't working right.
2015-09-14Fix crash in opengl render caused by gfx being blacklisted forJoe Eagar
non-power-of-2 texture support. Note that all I did was pass the correct width/height into glReadPixels; the result may not be the same as if non2 textures were enabled.
2015-04-24Add debug option --debug-gpumem to show GPU memory used in status bar.Antony Riakiotakis
Only used in ATIs and NVIDIAs. Used extensions are: https://www.opengl.org/registry/specs/ATI/meminfo.txt http://developer.download.nvidia.com/opengl/specs/ If you read the documentation, the numbers are not supposed to be exact and also depend on the time when the call is made. The numbers can also change quite quickly. It's only meant to give a rough measure of what is going on.
2015-04-09Fix T31546 fragment program gets created every frameAntony Riakiotakis
That was really crappy indeed. Now we have a separate API for low level OpenGL programs, plus a nice interface for GPU, also removes some GL calls from main code as a plus :) The source for the programs is also moved to nice external .glsl files (not sure which extension convention GPU assemply uses)
2015-03-30Potential fix for T43987, ambient occlusion different between offscreenAntony Riakiotakis
and on screen rendering. Aaaaah, the beauty of driver implementations of OpenGL! Turns out the problem here is that drivers calculate df/dy differently in some cases (probably because OpenGL counts y reverse to how the window system does, so drivers can get confused). Fixed this for the ATI case based on info we have so far, there's also the Intel case which will be handled separately (missing info on Intel's renderer string etc). Unfortunately we can't really fix this for the general case so we'll have to haldle cases as they come in our tracker and by adding silly string comparisons in our GPU initialization module <sigh>.
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-03-03Another stability commit for legacy users - don't crash when togglingAntony Riakiotakis
dyntopo just notify user that their system doesn't support it.
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
2014-11-25Fix framebuffer completeness being broken after last framebuffer cleanupAntony Riakiotakis
commits. Basically, we don't set a draw buffer until draw time comes. Also add explicit validation function to validate after all textures have been attached (could be done automatically at bind time too probably, but left out for now)
2014-11-18GPUFramebuffer API cleanup:Antony Riakiotakis
* read buffers are set at texture binding time * change naming when setting a texture as framebuffer * add function to set slot of framebuffer as current target instead of texture. * Binding a buffer reuses the dimensions of the texture at bind time (can use viewport to set to arbitrary range later) * Removed offscreen buffer width/height, use the generated texture dimensions instead. Those were supposed to be checked to see if generated texture had the requested size but were never actually changed to the texture dimensions (and it's redundant to store twice).
2014-11-18GPU framebuffer API:Antony Riakiotakis
Allow binding a texture to a different texture attachment than the first. Also fix a number error in seperable gaussian blur shader.
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-06-10Fix T40498 invalid textures flickering.Antony Riakiotakis
Issue here is most likely sampler uniforms and textures not being updated properly when zero binding is created. Solution for now is to allow zero binding but when this happens use sexy pink invalid texture instead :p.
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2013-09-12BGE: Potential fix for [#35522] Broken game engine compatibility since 2.66a ↵Daniel Stokes
on some ATI cards? Disabling display lists for legacy ATI cards since they don't support display lists well. Also removing an unused variable from the display list rasterizer.
2013-04-16move editmesh functions out editderivedmesh.c into editmesh.cCampbell Barton
2013-04-12Add function to query maximum texture size. Also, make texture uploadAntony Riakiotakis
functions aware of this limit.
2013-03-15Fix: multisample viewport drawing didn't work well with selection or particleBrecht Van Lommel
brushes, due to issues with color coded drawing or slow/buggy reading from such a buffer on some systems. In case multisample is enabled now, it uses an offscreen buffer for such drawing, which is not multisampled and so should not cause issues. This does mean there is some extra GPU memory usage when multisample is enabled, and we could optimize triple buffer to work together here somehow to share buffers, but it's better than having selection not working.
2013-03-10OpenGL: more work on fixed function lighting implementation as GLSL.Brecht Van Lommel
* Rename functions and move to own header. * Add wrapper functions for glLight. * Auto detect if we can use faster code for solid lighting. * Various fixes for textured draw mode.
2013-02-26OpenGL: implemenation of fixed function lighting as per pixel GLSL shaders. TheBrecht Van Lommel
code is still unused, but the intention is to use this to solve the double sided lighting problem on NVidia, and to make the materials work on OpenGL ES 2.0 eventually. The code works and matches the fixed function lighting pretty much exactly, but still needs optimizations. The actual integration in object draw will be committed later when more fixing & testing, there's lots of different combinations and unclear OpenGL state here.
2013-01-22Matcap support in 3D Viewport.Ton Roosendaal
Full log is here: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability#Matcap_in_3D_viewport Implementation notes: - Matcaps are an extension of Solid draw mode, and don't show in other drawmodes. (It's mostly intended to aid modeling/sculpt) - By design, Matcaps are a UI feature, and only stored locally for the UI itself, and won't affect rendering or materials. - Currently a set of 16 (GPL licensed) Matcaps have been compiled into Blender. It doesn't take memory or cpu time, until you use it. - Brush Icons and Matcaps use same code now, and only get generated/allocated on actually using it (instead of on startup). - The current set might get new or different images still, based on user feedback. - Matcap images are 512x512 pixels, so each image takes 1 Mb memory. Unused matcaps get freed immediately. The Matcap icon previews (128x128 pixels) stay in memory. - Loading own matcap image files will be added later. That needs design and code work to get it stable and memory-friendly. - The GLSL code uses the ID PreviewImage for matcaps. I tested it using the existing Material previews, which has its limits... especially for textured previews the normal-mapped matcap won't look good.
2012-10-25Fix issue after commit 50282: float texture painting non-color data textures didBrecht Van Lommel
not do correct partial updates, now it remembers if the opengl texture is a non-color data texture or not and takes that into account for the update. Also includes some renaming ncd => is_data for consistency with color space terminology used elsewhere.
2012-10-10Google Summer of Code project: "Smoke Simulator Improvements & Fire".Daniel Genrich
Documentation & Test blend files: ------------------ http://wiki.blender.org/index.php/User:MiikaH/GSoC-2012-Smoke-Simulator-Improvements Credits: ------------------ Miika Hamalainen (MiikaH): Student / Main programmer Daniel Genrich (Genscher): Mentor / Programmer of merged patches from Smoke2 branch Google: For Google Summer of Code 2012
2012-08-30Fix #32404: GLSL normal maps using float images were incorrectly gettingBrecht Van Lommel
color managed.
2012-05-01bmesh py api:Campbell Barton
add mtexpoly image access
2012-05-01Merging phase 1 of the BGE Harmony branch:Daniel Stokes
* Shadow color now usable in the BGE * Simplified the shadow panel while "Blender Game" renderer is active * Added variance shadow maps for the BGE * Buffered shadows on sun lamps in the BGE (orthographic) * Light textures in the BGE
2012-03-09style cleanup: comment blocksCampbell Barton
2012-02-17unify include guard defines, __$FILENAME__Campbell Barton
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-01-11minor cleanup for string use - no functional changesCampbell Barton
- use more logical names for strings, noticed too many strings called `str` when reviewing name patch. - pass __func__ macro to uiBeginBlock(), quite a few names were wrong (copy/paste error).
2012-01-11Longer names support for all ID and other object namesSergey Sharybin
This commit extends limit of ID and objects to 64 (it means 63 meaning characters and 1 for zero-terminator). CustomData layers names are also extended. Changed DNA structures and all places where length constants were hardcoded. All names which are "generating" from ID block should be limited by MAX_ID_NAME-2, all non-id names now has got own define called MAX_NAME which should be used all over for non-id names to make further name migration stuff easier. All name fields in DNA now have comment with constant which corresponds to hardcoded numeric value which should make it easier to further update this limits or even switch to non-hardcoded values in DNA. Special thanks to Campbell who helped figuring out some issues and helped a lot in finding all cases where hardcoded valued were still used in code. Both of forwards and backwards compatibility is stored with blender versions newer than January 5, 2011. Older versions had issue with placing null-terminator to DNA strings on file load which will lead to some unpredictable behavior or even crashes.
2011-12-15Bicubic bump map filtering.Antony Riakiotakis
This commit introduces bicubic bump map capabilities for the viewport for OpenGL 3.0+ capable GPUs. To use the functionality change the bump mapping method to "best quality" Previous "best quality" setting becomes "medium quality" now. For non OpenGL 3.0 GPUs this becomes the same as "medium quality" Also: * added tooltip descriptions to the bump method settings. * modified the shader to ommit extraneous matrix multiplications for matrices already provided by OpenGL. Bicubic shader by Morten Mikkelsen. Thanks a lot! Oh...and FIRST!
2011-11-29remove header text:Campbell Barton
"The Blender Foundation also sells licenses for use in proprietary software under the Blender Licens" also remove NaN references from files that have been added since blender went opensource.
2011-10-28Fix: OpenGL renders on graphics cards which do not support non-power-of-twoBrecht Van Lommel
textures were stretched and the wrong size.
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-09-09GPU: add gpu python module with export_shader() function to export GLSL shader.Benoit Bolsee
shader = gpu.export_shader(scene,material) Returns the GLSL shader that blender generates to produce the visual effect of material in scene for the purpose of reusing the shader in an external engine. This function is meant to be used in a material exporter so that the GLSL shader can be exported entirely. The return value is a dictionary containing the shader source code and all associated data. The full documentation is under sphinx. Warning: there has been an API between the patch and this commit: uniform['lamp'] and uniform['image'] now return python reference to ID block instead of ID name as before. The X3D exporter that uses this function must be adapted.