Age | Commit message (Collapse) | Author |
|
In the move to OpenGL 3.3 core profile, we drop support for compatibility profile and older versions.
OpenSubdiv was the only user; I'll update OSD next.
|
|
Also removed a leftover reference to the old basic-shader-glsl option.
|
|
These are always supported now
- instancing as of GL 3.1
- geometry shaders as of GL 3.2
The change to rna_scene.c could use some cleanup, since we don't really need a runtime query function.
|
|
Display lists are not part of modern OpenGL.
Only BGE used this, and I forced those uses to false. Commented out old BGE logic for reference.
|
|
See gpu_shader.c for the main changes.
EXT_geometry_shader4 brought this feature to GL versions < 3.2, but now it's just cluttering up our code.
Soon all platforms will be on version 3.3 so we won't even have to check support at runtime!
|
|
Initial work by Clément Foucault with contributions from Dalai Felinto
(mainly per-collection engine settings logic, and depsgraph iterator placeholder).
This makes Blender require OpenGL 3.3. Which means Intel graphic card
and OSX will break. Disable CLAY_ENGINE in CMake in those cases.
This is a prototype render engine intended to help the design of real
render engines. This is mainly an engine with enphasis in matcap and
ambient occlusion.
Implemented Features
--------------------
* Clay Render Engine, following the new API, to be used as reference for
future engines
* A more complete Matcap customization with more options
* Per-Collection render engine settings
* New Ground Truth AO - not enabled
Missing Features
----------------
* Finish object edit mode
- Fix shaders to use new matrix
- Fix artifacts when edge does off screen
- Fix depth issue
- Selection sillhouette
- Mesh wires
- Use mesh normals (for higher quality matcap)
- Non-Mesh objects drawing
- Widget drawing
- Performance issues
* Finish mesh edit mode
- Derived-Mesh-less edit mode API (mesh_rende.c)
* General edit mode
- Per-collection edit mode settings
* General engines
- Per-collection engine settings
(they are their, but they still need to be flushed by depsgraph, and
used by the drawing code)
|
|
|
|
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
|
|
|
|
Query max supported on init, use that to clamp user-set values.
|
|
|
|
need it.
|
|
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.
|
|
|
|
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
|
|
Replaces much slower manual accumulation buffer which simply did multiple renders.
Needs OpenGL3.2, otherwise multi-sample is disabled.
|
|
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.
|
|
This reverts commit d64b1221c67846bb954855a19c8dd093b83adc8e.
While this prevents the crash, offscreen renders still aren't working right.
|
|
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.
|
|
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.
|
|
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)
|
|
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>.
|
|
while studying GPU lib
|
|
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)
|
|
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.
|
|
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.
|
|
dyntopo just notify user that their system doesn't support it.
|
|
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
|
|
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
|
|
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)
|
|
* 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).
|
|
Allow binding a texture to a different texture attachment than the
first.
Also fix a number error in seperable gaussian blur shader.
|
|
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
|
|
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.
|
|
|
|
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.
|
|
|
|
functions aware of this limit.
|
|
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.
|
|
* 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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
color managed.
|
|
add mtexpoly image access
|
|
* 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
|
|
|
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|
|
- 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).
|