Age | Commit message (Collapse) | Author |
|
|
|
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).
|
|
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.
|
|
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!
|
|
"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.
|
|
textures were stretched and the wrong size.
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
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.
|