Commit Graph

386 Commits

Author SHA1 Message Date
48006292d8 svn merge ^/trunk/blender -r44189:44204 2012-02-17 20:56:25 +00:00
2b7ca2304a unify include guard defines, __$FILENAME__
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-17 18:59:41 +00:00
428f031237 svn merge ^/trunk/blender -r44076:44118 2012-02-15 12:08:06 +00:00
40e2942f25 Fix related to #30152, rainbow colours produced when loading hdr image to 3D viewport/ the Nyan cat bug.
Issue is caused by scaling for power of 2 dimensions and mipmapping that happens through GLU. It looks like the library cannot handle float colour values above 1.0 correctly. Since we are close to release I will just clamp the srgb result for now even though it will result in a small performance loss for 16 bit textures only. 

I tried a few things before that, glGenerateMipmaps + no scaling (supported for 2.0 GL hardware and up), or using our own scaling instead of glu among them which worked very nicely and gave a speedup too. However, since we are close to release and there may be issues with GPU mipmap generation, see:

http://www.gamedev.net/topic/495747-another-glgeneratemipmap-question/
(old discussion but better be sure than sorry)

I went for the most compatible solution. Maybe after release this can be tested if other devs agree.
2012-02-14 13:25:23 +00:00
873386b22d Fix #30170: with file saved in texture painting mode, when going to object mode
the image texture is missing. The flag to indicate that the mipmap levels were
already loaded into GPU memory was incorrectly set then.
2012-02-13 21:12:14 +00:00
2d1a05874b svn merge ^/trunk/blender -r44024:44076 2012-02-13 04:14:35 +00:00
6e38297b82 Fix: Avoid freeing frect, it always points to a buffer that will be freed later, like srgb_frect or ftilerect on or must not be freed, like Imbuf array itself. 2012-02-12 11:27:51 +00:00
5ea86e1e2b svn merge ^/trunk/blender -r43995:44024 2012-02-11 04:10:50 +00:00
18edbd103d Fix #30131: mac UI font corruption in release candidate, refined test for
ATI/Apple cards with broken non-power-of-two-textures missed some cards,
checked against list of GL_RENDERER values, hopefully complete now.
2012-02-10 17:12:44 +00:00
ac4484b239 svn merge ^/trunk/blender -r43976:43995 2012-02-09 01:53:14 +00:00
8e81da423c Fix #30071: crash with cycles glsl, textures functions (which are stubs still)
got out of sync with node changes.
2012-02-08 16:48:26 +00:00
d0412a1981 svn merge ^/trunk/blender -r43864:43887 2012-02-05 02:30:30 +00:00
04266c2225 Fix: non-power-of-two-textures were always disabled on ATI/Apple due to poor
support in some older cards, now it does a more precise check for problematic
cards so that it can be enabled on new cards that do support it properly.
2012-02-04 19:57:09 +00:00
8926cbd0a7 svn merge ^/trunk/blender -r43819:43830 2012-02-02 00:04:47 +00:00
d882f05b82 Fix: Bicubic bump mapping does not work for UVs outside the 0,1 range.
This issue is caused by texelFetch which does not take wrapping options into account as it uses unnormalized uv coordinates to access a texel. A hack was made to do manual wrapping in the shader. This is acceptable because texture wrap mode is always treated as "repeat" elsewhere in 3D view in blender.

Thanks to Morten Mikkelsen for pointing out the cause of the issue and providing the fix.
2012-02-01 17:47:13 +00:00
4aa82806ef svn merge ^/trunk/blender -r43751:43819, need to look into changes made to editmesh_loop.c from this range still 2012-02-01 09:31:13 +00:00
6f46692e76 Fix bicubic map sampling to convert the sampled color to monochrome before using it to calculate the derivative. 2012-01-31 22:12:33 +00:00
b281b5278f svn merge ^/trunk/blender -r43472:43482 2012-01-18 07:04:17 +00:00
b4df2658de remove ARB_texture_gather from bicubic bump map dependencies. It will be needed when/if monochrome images are supported 2012-01-18 00:03:09 +00:00
0f28c1c27a svn merge ^/trunk/blender -r43461:43472 2012-01-17 21:08:25 +00:00
a8081c1d2b Uv Tools branch GSOC 2011
=========================
Documentation: http://wiki.blender.org/index.php/User:Psy-Fi/UV_Tools

Major features include:

*16 bit image support in viewport
*Subsurf aware unwrapping
*Smart Stitch(snap/rotate islands, preview, middlepoint/endpoint stitching)
*Seams from islands tool (marks seams and sharp, depending on settings)
*Uv Sculpting(Grab/Pinch/Rotate)

All tools are complete apart from stitching that is considered stable but with an extra edge mode under development(will be in soc-2011-onion-uv-tools).
2012-01-17 16:31:13 +00:00
a7b0a11811 svn merge ^/trunk/blender -r43278:43294 2012-01-11 15:04:54 +00:00
e10fd04db0 use BLI_strncpy and BLI_snprintf when the size of the string is known.
fix for sequencer unique naming which was missed with string length update.
2012-01-11 12:33:51 +00:00
535d27eb49 minor cleanup for string use - no functional changes
- 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-11 09:33:44 +00:00
51bada696f Longer names support for all ID and other object names
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.
2012-01-11 08:51:06 +00:00
d0cdefd9fa svn merge ^/trunk/blender -r43092:43092 2012-01-04 06:20:10 +00:00
3b8404ac53 derivative maps must take into account that texture scales can be negative 2012-01-03 22:27:30 +00:00
aa1325ef55 calculate factor before using MAX2 macro 2012-01-03 22:18:52 +00:00
5fbd6223c5 derivative maps were not working correctly with UV scale (the texture setting size) 2012-01-03 22:09:22 +00:00
c0eec8f379 svn merge ^/trunk/blender -r43062:43085 2012-01-03 02:16:52 +00:00
0eb8a384c9 Remove some silly variable copies that stuck around from a previous refactor. 2012-01-02 19:01:16 +00:00
cb8090d4c8 svn merge ^/trunk/blender -r42940:42953 2011-12-28 22:55:45 +00:00
9d3f5ea334 Fix #29715: cycles and glsl normal node not working correct. 2011-12-28 19:42:22 +00:00
8ccf5026e0 more changes from bmesh into trunk (mesh mpoly strict member) 2011-12-28 14:21:51 +00:00
4ced91da47 svn merge ^/trunk/blender -r42778:42839 2011-12-23 08:41:53 +00:00
ac498a6b64 Cleaning up the GPU_extensions_init/exit() code a bit to keep the Blenderplayer from crashing on exit and restart. 2011-12-23 07:10:01 +00:00
4d7c44717a Code cleanup: fix some clang static checker warnings. 2011-12-22 20:29:44 +00:00
2457d4f5ab svn merge ^/trunk/blender -r42680:42722 2011-12-19 10:40:48 +00:00
b8e96e70dc better to generate the library string always because it could lead to null pointer dereferences. I don't have a non-shader system to check so skipping the conditional just to be safe 2011-12-17 13:02:31 +00:00
7d2fbfeb9f move GPU_code_generate_glsl_lib to GPU_extensions_init. This makes more sense as we cleanup the library string in GPU_extensions_exit. Thanks to Mitchel Stokes for reporting and proposing this 2011-12-17 12:58:20 +00:00
5c6ee6b523 svn merge ^/trunk/blender -r42670:42680 2011-12-17 02:41:53 +00:00
ad96dacbc5 style edit only - move parenthesis onto second line of function definition (in keeping with most of blenders code)
also split some long lines in own code.
2011-12-17 00:52:36 +00:00
db6cb30941 svn merge ^/trunk/blender -r42669:42670 2011-12-16 23:50:55 +00:00
e5b1f9c28d svn merge ^/trunk/blender -r42660:42669 2011-12-16 23:26:29 +00:00
3311164b24 Math lib: matrix multiplication order fix for two functions that were
inconsistent with similar functions & math notation:

mul_m4_m4m4(R, B, A) => mult_m4_m4m4(R, A, B)
mul_m3_m3m4(R, B, A) => mult_m3_m3m4(R, A, B)

For branch maintainers, it should be relatively simple to fix things manually,
it's also possible run this script after merging to do automatic replacement:
http://www.pasteall.org/27459/python
2011-12-16 19:53:12 +00:00
2253b63c97 static functions for getting power of 2 values were being copied about too much, add to the BLI_math api.
- is_power_of_2_i
- power_of_2_min_i
- power_of_2_max_i
2011-12-16 09:25:07 +00:00
862dc635ed svn merge ^/trunk/blender -r42617:42655 2011-12-15 23:59:02 +00:00
6ccc605660 Bicubic bump map filtering.
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-12-15 13:58:09 +00:00
65f3b93f14 svn merge ^/trunk/blender -r42521:42550 2011-12-10 05:38:00 +00:00
3f39fde373 Compile fix for r.42546 typo 2011-12-10 03:24:19 +00:00