Commit graph

198 commits

Author SHA1 Message Date
Sam Gateau
bd5c6517a5 Merge branch 'master' of https://github.com/highfidelity/hifi into temp0
Conflicts:
	interface/src/ui/MetavoxelEditor.cpp
	interface/src/ui/overlays/Sphere3DOverlay.cpp
2014-10-03 17:31:05 -07:00
Andrzej Kapolka
91942e6188 Reduce the size of the smoothing step. 2014-10-03 17:17:22 -07:00
Andrzej Kapolka
3d88463569 Blend between cube face textures. 2014-10-03 17:05:14 -07:00
Sam Gateau
738369e21f Replacing glutSolidSphere by a cached Geometry
Instead of calling glutSolidSphere, just call Application::getInstance()->getGeometryCache()->renderSphere(...)

- replaced all the instances of "glutSolidSphere"
- Changed the atmosphere shaders so instead of drawing a sphere of the size of the atmosphere, we draw a unit sphere, the vertices get scaled at the right radius in th vertex shader using  fOuterRadius
2014-10-03 16:55:58 -07:00
Andrzej Kapolka
bf1c7b17fe Fix for texture coordinate generation. 2014-10-02 18:09:47 -07:00
Andrzej Kapolka
16cfaa6ea5 Use cubic texture coordinate generation for the dual contour surfaces. 2014-09-23 13:28:00 -07:00
Andrzej Kapolka
646c0dc48f Working on translucent model bits. 2014-09-19 15:31:46 -07:00
Andrzej Kapolka
446c2193ff Limit what we render for deferred point/spot lights based on the light's
radius.
2014-09-19 12:18:00 -07:00
Andrzej Kapolka
b9ae005e53 Working on the actual deferred lights. 2014-09-18 16:12:46 -07:00
Andrzej Kapolka
7580a1da89 Glow fix for simple shader. 2014-09-15 17:33:07 -07:00
Andrzej Kapolka
580d591dc4 Working on getting glow to work with deferred lighting. 2014-09-15 17:11:36 -07:00
Andrzej Kapolka
0f3a020b5d Working on getting particles/entities to work with deferred lighting;
normalize normals from buffer.
2014-09-15 16:07:48 -07:00
Andrzej Kapolka
e3a1341be1 Don't include the color on the skin. 2014-09-15 12:52:35 -07:00
Andrzej Kapolka
b3b82ba56c I think we need to include the color. 2014-09-15 12:49:51 -07:00
Andrzej Kapolka
70c8c146bc Fix for specular issue on Nvidia, try passing along material colors. 2014-09-15 12:44:25 -07:00
Andrzej Kapolka
4475759461 Revert the normal-based ambient occlusion; I wasn't crazy about the look of
it.  Will perhaps revisit later.
2014-09-15 11:52:44 -07:00
Andrzej Kapolka
48adbdfbd2 Shadow fix. 2014-09-12 19:05:49 -07:00
Andrzej Kapolka
24b193b5dc Alpha testing bits. 2014-09-12 18:11:46 -07:00
Andrzej Kapolka
42c8701b26 Don't use gl_Color for skin. 2014-09-12 17:36:58 -07:00
Andrzej Kapolka
72f38900bb Fix for blending on models. 2014-09-12 17:31:03 -07:00
Andrzej Kapolka
53933fc9c6 Working on deferred lighting for models. 2014-09-12 17:09:07 -07:00
Andrzej Kapolka
7074d96c04 Working on support for specular components in deferred lights. 2014-09-12 14:11:56 -07:00
Andrzej Kapolka
f954e4d7ea Fix for deferred lighting on voxels. 2014-09-11 19:06:29 -07:00
Andrzej Kapolka
e6f37544fd Use deferred lighting for voxels as well as metavoxels. 2014-09-11 18:06:56 -07:00
Andrzej Kapolka
21f3f2b90e Switch to deferred lighting for metavoxels. 2014-09-04 17:17:44 -07:00
Andrzej Kapolka
2dfabdfe64 Support for scaling splat textures in S and T, use mipmaps for them. 2014-08-22 16:43:09 -07:00
Andrzej Kapolka
72500630b0 Basic splatting. 2014-08-20 19:26:06 -07:00
Andrzej Kapolka
416d9bac2e Working on texture rendering. 2014-08-20 14:48:02 -07:00
Andrzej Kapolka
668f6d3cfd Support for shadows on heightmaps. 2014-08-15 16:13:47 -07:00
Andrzej Kapolka
2c0f8ff57e Working on rejiggering the heightfield tiles. 2014-08-12 10:56:15 -07:00
Andrzej Kapolka
b7b1b018ee No need to use a texture for the cursor; we can just use a fragment shader. 2014-08-08 11:24:57 -07:00
Andrzej Kapolka
0fc34a47aa Show heightfield cursor. 2014-08-07 18:19:58 -07:00
Andrzej Kapolka
4696832ec6 Compute heightfield normals from adjacent values in vertex shader. 2014-08-05 15:13:50 -07:00
Andrzej Kapolka
c3c2265ddd Hide the unset (black) bits. 2014-07-30 18:14:11 -07:00
Andrzej Kapolka
6824479762 Progress on rendering heightfield buffers. 2014-07-29 16:06:35 -07:00
Andrzej Kapolka
aeee369286 Working on heightfield implementation. 2014-07-28 19:10:59 -07:00
Andrzej Kapolka
bbd977777a Merge branch 'master' of https://github.com/highfidelity/hifi into metavoxels 2014-07-22 19:24:02 -07:00
Andrzej Kapolka
4f87524821 Switched back to using uniforms for light parameters, as using the fixed
function state killed my frame rate.  Also cleaned up some of the location
tracking.
2014-07-22 18:03:13 -07:00
Andrzej Kapolka
be028c2b01 Fixes for local lights. 2014-07-22 14:13:51 -07:00
Andrzej Kapolka
0ddd3e650c More point bits (trying a different tack). 2014-07-21 19:00:13 -07:00
TonyPeng
ef4b95c6e0 Merged from master. Get rid of redundant GL fog states. Moved local light parameters to shader uniform arrays. 2014-07-09 13:27:42 -07:00
TonyPeng
56eadcb0dc Get rid of redundant GL calls for fog. Enable and disable fog during rendering stage of voxels. Moved the local light parameters to shader uniform arrays. 2014-07-09 12:05:34 -07:00
TonyPeng
94e81da557 Added local lights to avatar. Added haze to voxel. 2014-07-08 09:44:28 -07:00
Chris Oates
2d9a42c07a Merge branch 'master' of https://github.com/highfidelity/hifi 2014-07-02 13:12:37 -07:00
Chris Oates
e903b1659a Implemented Improved Perlin Noise in existing "textured voxels" option.
TextureCache.cpp: modified so that permutation texture contains known permutation of 0..255 rather than random set of values. Does not noticeably affect visuals.
perlin_modulate.frag: implementation of improved noise, per 2002 SIGGRAPH paper, including "turbulence" summation.
2014-07-02 13:09:16 -07:00
barnold1953
1af2996cf2 Properly use body orientation for Oculus camera 2014-06-27 09:53:31 -07:00
barnold1953
67c5281205 Fixed CMake for oculus. Gave Oculus its own camera for minimum latency. 2014-06-26 17:10:53 -07:00
barnold1953
61b20b2be0 Working 3.2 Oculus SDK 2014-06-26 09:56:19 -07:00
Andrzej Kapolka
391902f79b Cascaded shadow maps for models. 2014-05-29 15:30:40 -07:00
Andrzej Kapolka
09231f01f3 Retain "simple" shadows, supply cascaded as option. 2014-05-29 12:48:41 -07:00
Andrzej Kapolka
ff77644caa Progress on selecting cascades. 2014-05-28 18:35:30 -07:00
Andrzej Kapolka
c3f6cab199 Working on cascading shadow maps. 2014-05-28 15:20:09 -07:00
Andrzej Kapolka
7c12417653 Use multisampling on the shadow maps for the voxels, too. 2014-05-27 17:26:19 -07:00
Andrzej Kapolka
e22d239d4d What the heck; let's try using some multisampling on the shadow maps. 2014-05-27 12:30:45 -07:00
Andrzej Kapolka
67e3454a86 Missed a few files. 2014-05-23 16:37:12 -07:00
Andrzej Kapolka
0baf757c0d Basic support for shadows on models. 2014-05-23 16:35:51 -07:00
Andrzej Kapolka
bfd00f1b15 Use local viewer model for specular. 2014-05-23 10:57:14 -07:00
Andrzej Kapolka
4f4b4c08bb Restore specular lighting--but, per the OpenGL spec, shut off specular
contribution if the surface isn't facing the light.
2014-05-19 12:29:49 -07:00
Kai Ludwig
51965fd283 changed
float specular = max(0.0, dot(normalize(gl_LightSource[0].position + vec4(0.0, 0.0, 1.0, 0.0)), normalizedNormal));
to
    float specular = max(0.0, dot(gl_LightSource[0].position, normalizedNormal));

Calculation for specular value has to be done like in all other shaders with the unmodified unnormalized lightsource position. Otherwise the specular effect will have weird behaviour.
2014-05-16 15:44:07 +02:00
Andrzej Kapolka
d0537e7ead Specular map support. 2014-05-06 17:32:10 -07:00
Stephen Birarda
f969e050cd add apache license to shader headers 2014-04-09 09:59:05 -07:00
Andrzej Kapolka
563725e781 Use the "correct" shadow strategy: include only ambient term when in shadow. 2014-03-27 13:44:34 -07:00
Andrzej Kapolka
7cc7230745 Adjust the shadow shader to prevent seeing shadows on the opposite sides of
objects.  Closes #2544.
2014-03-27 13:18:45 -07:00
Andrzej Kapolka
62884f1f4f Don't use textures/fancy shaders when rendering shadow map. Closes #2270. 2014-03-24 13:15:03 -07:00
ZappoMan
d6b71f19a8 fix voxel texture to work better with larger TREE_SCALE 2014-02-12 18:00:09 -08:00
Andrzej Kapolka
4deb9936ba Don't add the specular alpha in the model fragment shaders. 2014-01-27 17:44:13 -08:00
Andrzej Kapolka
aabff3f141 Adjust the fog density; getting different results on Linux vs. OS X. 2014-01-22 14:17:02 -08:00
Andrzej Kapolka
0a3d6ae5e0 More work on metavoxel editing (grid, etc.) 2014-01-21 19:31:56 -08:00
Andrzej Kapolka
e7a3beed78 Removed a couple more resources. 2014-01-16 15:17:38 -08:00
Andrzej Kapolka
1b891cb326 Removed unused resources. 2014-01-16 15:16:19 -08:00
Andrzej Kapolka
c003a55c37 Diffuse lighting. 2013-12-12 16:19:05 -08:00
Andrzej Kapolka
c1aec11b32 More work on rendering voxels. 2013-12-12 15:14:19 -08:00
Andrzej Kapolka
f6b3a6ceca The other part of the Oculus ambient occlusion fix. 2013-11-26 17:53:31 -08:00
Andrzej Kapolka
e406988ed3 Partial fix for ambient occlusion with Oculus. 2013-11-26 17:18:03 -08:00
Andrzej Kapolka
c5406c47a6 Moved Oculus code out of Application, started on using StereoConfig to get
actual values to replace the magic numbers.
2013-11-26 11:59:06 -08:00
Andrzej Kapolka
f0e5872b89 Lighten the shadows, remove some debug code. 2013-11-21 12:29:22 -08:00
ZappoMan
c4a2b3c49b fix thinning in voxels as points by using correct points to calculate width of voxel based on camera position relative to voxel 2013-11-03 11:10:00 -08:00
ZappoMan
508b8f4678 change in comment to kick off build 2013-11-01 16:29:49 -07:00
ZappoMan
b103f9dacf clean up 2013-11-01 15:32:17 -07:00
ZappoMan
e62322b805 clean up comment 2013-11-01 15:28:54 -07:00
ZappoMan
61b6d6a4a4 added comment about fixing point selection 2013-11-01 15:27:57 -07:00
ZappoMan
cab87c3a97 added comment about fixing point selection 2013-11-01 15:27:25 -07:00
ZappoMan
b3aac56d29 first cut a variable point size point rendering 2013-11-01 14:33:06 -07:00
Andrzej Kapolka
12374c2cc4 Allow more clusters per mesh. 2013-10-31 17:01:00 -07:00
Andrzej Kapolka
06e050f1c1 Normal map support almost there. 2013-10-29 22:13:00 -07:00
Andrzej Kapolka
62b2388592 Temporary fix for Mavericks: the skin shader isn't getting the color, so just
use white.  We're not using vertex colors on anything skinned yet, anyway.
2013-10-25 14:40:00 -07:00
Andrzej Kapolka
bae4a17605 Voxel attachments. 2013-10-24 13:59:04 -07:00
Andrzej Kapolka
7ddac20c62 Allow more bones. The model I'm testing with has about 60. 2013-10-18 19:18:48 -07:00
Andrzej Kapolka
7e174093e4 Factoring the FBX model code out to a shared base class. 2013-10-18 17:26:03 -07:00
Andrzej Kapolka
a79c0a9244 Removed unused shader. 2013-10-15 17:14:20 -07:00
Andrzej Kapolka
d06acdd169 Per-pixel shading, material tweaks. 2013-10-15 11:50:29 -07:00
Andrzej Kapolka
e97cfb8cf8 Per-pixel specular for blend faces. 2013-10-14 19:59:13 -07:00
Andrzej Kapolka
124966d2e4 More progress on skinning. 2013-10-14 18:39:19 -07:00
ZappoMan
dbfc0956c1 added normals to voxel shader 2013-09-27 13:26:58 -07:00
Philip Rosedale
0fbabe9891 Merge pull request #984 from ZappoMan/voxel_geo_shader
Voxel Geometry Shader Experiment
2013-09-26 17:22:55 -07:00
ZappoMan
3ab92a592a fix comments in shaders 2013-09-26 17:05:04 -07:00
ZappoMan
07515d1c5f fix projection between shaders 2013-09-26 17:03:50 -07:00
ZappoMan
c0bfdfbc4f fix comment 2013-09-26 16:54:20 -07:00
ZappoMan
57b30c13d8 style cleanup 2013-09-26 16:45:09 -07:00
ZappoMan
864c00c6e0 removed some dead code 2013-09-26 16:38:29 -07:00