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-06-11BL_Shader.setUniformEyef(name)Benoit Bolsee
defines a uniform that reflects the eye being rendered in stereo mode: 0.0 for the left eye, 0.5 for the right eye. In non stereo mode, the value of the uniform is fixed to 0.0. The typical use of this uniform is in stereo mode to sample stereo textures containing the left and right eye images in a top-bottom order. python: shader = obj.meshes[0].materials[mat].getShader() shader.setUniformEyef("eye") shader: uniform float eye; uniform sampler2D tex; void main(void) { vec4 color; float ty, tx; tx = gl_TexCoord[0].x; ty = eye+gl_TexCoord[0].y*0.5; // ty will be between 0 and 0.5 for the left eye render // and 0.5 and 1.0 for the right eye render. color = texture(tex, vec2(tx, ty)); ... }
2016-06-11Atomic ops: Fix atomic_add_uint32 and atomic_sub_uint32 in WindowsBenoit Bolsee
The assembler version in Windows used to return the previous value of the variable while all the other versions return the new value. This is now fixed for consistency. Note: this bug had no effect on blender because no part of the code use the return value of these functions, but the future BGE DeckLink module makes use of it to implement reference counter.
2016-06-11BGE: Various render improvements.Benoit Bolsee
bge.logic.setRender(flag) to enable/disable render. The render pass is enabled by default but it can be disabled with bge.logic.setRender(False). Once disabled, the render pass is skipped and a new logic frame starts immediately. Note that VSync no longer limits the fps when render is off but the 'Use Frame Rate' option in the Render Properties still does. To run as many frames as possible, untick the option This function is useful when you don't need the default render, e.g. when doing offscreen render to an alternate device than the monitor. Note that without VSync, you must limit the frame rate by other means. fbo = bge.render.offScreenCreate(width,height,[,samples=0][,target=bge.render.RAS_OFS_RENDER_BUFFER]) Use this method to create an offscreen buffer of given size, with given MSAA samples and targetting either a render buffer (bge.render.RAS_OFS_RENDER_BUFFER) or a texture (bge.render.RAS_OFS_RENDER_TEXTURE). Use the former if you want to retrieve the frame buffer on the host and the latter if you want to pass the render to another context (texture are proper OGL object, render buffers aren't) The object created by this function can only be used as a parameter of the bge.texture.ImageRender() constructor to send the the render to the FBO rather than to the frame buffer. This is best suited when you want to create a render of specific size, or if you need an image with an alpha channel. bge.texture.<imagetype>.refresh(buffer=None, format="RGBA", ts=-1.0) Without arg, the refresh method of the image objects is pretty much a no-op, it simply invalidates the image so that on next texture refresh, the image will be recalculated. It is now possible to pass an optional buffer object to transfer the image (and recalculate it if it was invalid) to an external object. The object must implement the 'buffer protocol'. The image will be transfered as "RGBA" or "BGRA" pixels depending on format argument (only those 2 formats are supported) and ts is an optional timestamp in the image depends on it (e.g. VideoFFmpeg playing a video file). With this function you don't need anymore to link the image object to a Texture object to use: the image object is self-sufficient. bge.texture.ImageRender(scene, camera, fbo=None) Render to buffer is possible by passing a FBO object (see offScreenCreate). bge.texture.ImageRender.render() Allows asynchronous render: call this method to render the scene but without extracting the pixels yet. The function returns as soon as the render commands have been send to the GPU. The render will proceed asynchronously in the GPU while the host can perform other tasks. To complete the render, you can either call refresh() directly of refresh the texture to which this object is the source. Asynchronous render is useful to achieve optimal performance: call render() on frame N and refresh() on frame N+1 to give as much as time as possible to the GPU to render the frame while the game engine can perform other tasks. Support negative scale on camera. Camera scale was previously ignored in the BGE. It is now injected in the modelview matrix as a vertical or horizontal flip of the scene (respectively if scaleY<0 and scaleX<0). Note that the actual value of the scale is not used, only the sign. This allows to flip the image produced by ImageRender() without any performance degradation: the flip is integrated in the render itself. Optimized image transfer from ImageRender to buffer. Previously, images that were transferred to the host were always going through buffers in VideoTexture. It is now possible to transfer ImageRender images to external buffer without intermediate copy (i.e. directly from OGL to buffer) if the attributes of the ImageRender objects are set as follow: flip=False, alpha=True, scale=False, depth=False, zbuff=False. (if you need to flip the image, use camera negative scale)
2016-06-11Fix Gradient Texture and OSL after refactor.Thomas Dinges
2016-06-11Attempted fix for T48625: tablet button configured to right click not ↵Brecht Van Lommel
working on OS X.
2016-06-11Cycles: nodify shader nodesBrecht Van Lommel
Differential Revision: https://developer.blender.org/D2038
2016-06-11Fix T48617: VSE: Do not draw backdrop in Seq + Preview mode, only makes ↵Bastien Montagne
sense when no preview is available...
2016-06-11BLI_rand: add BLI_rng_get_char_nCampbell Barton
Use to fill an array of bytes to random values.
2016-06-11Fix T48634: Interpolation and distribution of Children Particles breaks.Bastien Montagne
Own stupid off-by-one regression in rB019ce363b01bba0afe1 and later...
2016-06-11UI Font: Fix bad kerning of Thai font.Bastien Montagne
Thai font is a complex script that assumes full featured unicode layout engine, while Blender only knows about basic kerning (offset of a char based on the previous one). So this commit edits Thai part of our i18n font to fix the very bad spacing of thai chars we had in Blender so far. Work done by Hồ Châu, many thanks!
2016-06-10VSE: select by group: add option to select by group on same channel only.Bastien Montagne
2016-06-10Install_deps: add '--no-build' option to prevent compiling anything.Bastien Montagne
2016-06-10GPU: use basic-shader for line-stippleCampbell Barton
2016-06-10Remove redundant GL attribute push/popCampbell Barton
Stipple isnt left on during object drawing
2016-06-10Fix GPU logical error changing stippleCampbell Barton
2016-06-10Cleanup: brace-placementCampbell Barton
2016-06-09BGE: alpha on frame buffer and precedence of MSAA over swap.Benoit Bolsee
A new option '-a' can be passed to the blenderplayer. It forces the framebuffer to have an alpha channel. This can be used in VideoTexture to return a image with alpha channel with ImageViewport (provided alpha is set to True on the ImageViewport object and that the background color alpha channel is 0, which is the default). Without the -a option, the frame buffer has no alpha channel and ImageViewport always returns an opaque image, no matter what. In Linux, the player window will be rendered transparently over the desktop. In Windows, the player window is still rendered opaque because transparency of the window is only possible using the 'compositing' functions of Windows. The code is there but not enabled (look for WIN32_COMPOSITING) because 1) it doesn't work so well 2) it requires a DLL that is only available on Vista and up. give precedence to AA over Swap copy: Certain GPU (intel) will not allow MSAA together with swap copy. Previously, swap copy had priority over MSAA: fewer AA samples would be chosen if it was the condition to get swap copy. This patch reverse the logic: swap copy will be abandonned if another swap method (undefined or exchange) will provide the number of AA samples requested. If no AA samples is requested, swap copy still has the priority of course.
2016-06-09GPU: only call glShadeModel when neededCampbell Barton
2016-06-09GPU: avoid multiple bind calls in GPU_draw_pbvh_buffersCampbell Barton
Also add utility functions: GPU_basic_shader_bind_enable/disable so we don't have to get the previous state every time and manipulate it
2016-06-09Flat shading for basic shaderAlexander Romanov
The purpose of the patch is to replace deprecated glShadeModel. To decrease glShadeModel calls I've set GL_SMOOTH by default Reviewers: merwin, brecht Reviewed By: brecht Subscribers: blueprintrandom, Evgeny_Rodygin, AlexKowel, yurikovelenov Differential Revision: https://developer.blender.org/D1958
2016-06-09Fix T48614: Blender from buildbot crash when Separate selection in this ↵Bastien Montagne
particular scene. Regression from recent rB2c5dc66d5effd4072f438afb, if last item of last chunk of a mempool was valid, it would not be returned by mempool iterator step, which would always return NULL in that case.
2016-06-09Compilation error fix after recent cleanupSergey Sharybin
Please do not do cleanups in minimal configuration, doing that has been proven to only cause issues without solving anything meaningful ;)
2016-06-08Cleanup: GPU arg wrappingCampbell Barton
2016-06-08Cleanup: GPU headersCampbell Barton
2016-06-08GPU: avoid disabling basic-shader for lassoCampbell Barton
Replace glDrawPixels w/ glaDrawPixelsTex
2016-06-08Fix armature stick draw, unpack-alignment was set but never restoredCampbell Barton
Drawing a single stick bone set the alignment to 1, applying this setting to the rest of Blender.
2016-06-08glutil: add glaGetOneInt helperCampbell Barton
2016-06-08Depsgraph: Avoid redundant connection from IK solver to chainSergey Sharybin
Could give barely measurable speedup on a complex rigs.
2016-06-08Depsgraph: Remove unused codeSergey Sharybin
Became obsolete after recent changes.
2016-06-08Depsgraph: Optimize flush update when there's few objects and fewzillions of ↵Sergey Sharybin
bones Avoid annoying checks form inside operations loop, gives few percent speedup in files like army_of_blenrigs.
2016-06-08GPU: fix texface image w/ basic-shaderCampbell Barton
2016-06-08Make uiLists placed in popups usableJulian Eisel
It's still not completely working - there are still some glitches - but far better than before. To make buttons of the uiList work, you have to add a 'check' callback to the operator that invokes the menu. Only if it returns True, the uiList gets refreshed. To avoid this we have to make the region refresh tagging in the entire button handling a bit smarter. Changes I had to do: * Call uiList handling from menu/popup handling if needed. * Make uiList handling use special popup refresh tag if placed in menu. * Allow popups invoked from py operator to tag for refresh by using operator 'check' callback. * Tag popup for refresh when resizing uiList. Mostly fixes T48612.
2016-06-08Fix FPE exception happening when converting linear<->srgb using SIMDSergey Sharybin
2016-06-08Cleanup: typoCampbell Barton
2016-06-08Cleanup: typosCampbell Barton
2016-06-08Fix edit-mesh draw not disabling stippleCampbell Barton
Caused problem w/ basic-shader
2016-06-08Cycles: Fix crash after recent zero scale instance optimizationSergey Sharybin
2016-06-08Buildobt: Update master configSergey Sharybin
2016-06-08Buildbot: Give 2015 builds different nameSergey Sharybin
2016-06-083D Text: Use BLI_array_store for undo storageCampbell Barton
2016-06-083D Text: Store separate arrays for undo dataCampbell Barton
Don't store maximum length of text per undo step, or attempt to pack all data in a single array. Was storing 32766 characters per undo step, irrespective of actual text length.
2016-06-083D Text: move undo into its own fileCampbell Barton
2016-06-08BLI_array_store: move helper functions into their own APICampbell Barton
2016-06-08Fix cloth stability when in perfect rest shape.Lukas Tönne
The way cloth is coded, structural springs are only effective when stretched, while bending springs act only when shrunk. However, when cloth is exactly in its rest shape, neither have any effect, and effectively don't exist for the implicit solver. This creates a stability problem in the initial frames of the simulation, especially considering that gravity seems to act so precisely that it doesn't disturb the strict equality of lengths, so in parts of the cloth this springless state can continue for quite a while. Here is an example of things going haywire because of this and some suspicious logic in collision code acting together: {F314558} Changing the condition so that structural springs are active even at exactly rest length fixes this test case. The use of >= is also supported by the original paper that the cloth implementation in blender is based on. Reviewers: lukastoenne Reviewed By: lukastoenne Projects: #bf_blender Differential Revision: https://developer.blender.org/D2028
2016-06-08Buildbot: Trickery for MSVC2015 and NVCCSergey Sharybin
2016-06-08Correct assertCampbell Barton
2016-06-08GPU: fix/workaround basic shader font-colorCampbell Barton
All text was displaying black. BLF uses alpha-only textures which aren't supported by the basic-shader, Workaround this by using texture swizzle so the RGB components of the texture are set to 1.
2016-06-08Cycles: Fix two numerical issues in the volume codeLukas Stockner
This hopefully fixes T48383 by avoiding two numerical problems that I found in the volume code. Reviewers: sergey, dingto, brecht Reviewed By: sergey, dingto, brecht Maniphest Tasks: T48383 Differential Revision: https://developer.blender.org/D2051
2016-06-08Cleanup: Add comment on behavior of tweak eventsJulian Eisel
It's not obvious that they use the mouse coordinate of the initial key-press event (behavior since rBf1f33ba7be2d), so added comment. Also corrected other comments.
2016-06-07Fix T48600: VSE strip 'side selection' fails in 'Both' case.Bastien Montagne
Looks like a line was forgotten in the 'BOTH' case in code...