Commit Graph

3264 Commits (91cd68d641dfce5a61570f42691f554a1110a050)

Author SHA1 Message Date
Tobias Zwick 196c62fbe8 slightly elevate the lights in z direction from the landscape (making the light throw less shadows on visible materials and objects) 2015-01-01 16:07:24 +01:00
Tobias Zwick 12f127b4bd weaken the effect the material normal map has on the total landscape normal calculation 2015-01-01 16:07:23 +01:00
Sven Eberhardt 2b997b994a Add light effect to explosions.
Currently, all players see the light. In the future, we may want limit it to the controller of the explosion.
2014-12-31 13:36:22 +01:00
Maikel de Vries 588b75955f correct bottom open for Chine.ocs 2014-12-30 14:13:34 +01:00
Armin Burgmeier 4c3235bbc9 Ifdef-out unused shader code in ObjectLightShader.glsl 2014-12-29 22:26:18 +01:00
Armin Burgmeier be92651219 Make the clonk a bit brighter
This compenates for the fact that the ambient and emissive part of
mesh materials are not taken into account anymore.
2014-12-28 17:22:32 +01:00
Armin Burgmeier a3049207c9 Use full ambient lighting in global viewports
This allows to see the whole landscape without any areas covered by FoW
in the global viewport. Basically the ambient lighting is set to 1.0
independent of the ambient light map. In the course of this, a second
shader for the landscape has been introduced.
2014-12-28 15:07:42 +01:00
Armin Burgmeier 8686441d45 Make mesh shaders use the C4Shader slice machinery 2014-12-22 22:56:30 +01:00
Armin Burgmeier 8c42704181 Rename some shader files and add basic shader for meshes 2014-12-22 22:56:30 +01:00
Armin Burgmeier 7f1cf15274 Change slice syntax such that positions appear in parentheses
This allows to ignore slice declarations using `#define slice(x)`, which
mill be useful for custom mesh material shaders, allowing to write them
such that they can be used standalone in a mesh viewer but also as slices
for OpenClonk, in which case lighting and color modulation will be applied
automatically.
2014-12-22 22:56:30 +01:00
Maikel de Vries 1e5d5b56da fix IsPowerAvailable function in power library 2014-12-21 20:20:25 +01:00
Maikel de Vries 2d1647ea77 improved prioritizing of power consumers 2014-12-19 21:47:08 +01:00
Maikel de Vries 289f59a872 moved consumer and producer library into power library folder 2014-12-19 14:59:46 +01:00
Maikel de Vries 22dfab63aa clean up scripts of power library 2014-12-19 14:56:01 +01:00
Tobias Zwick 4981182cf8 Merge remote-tracking branch '_origin/master' into lights
Conflicts:
	src/c4group/C4Components.h
2014-12-15 21:16:40 +01:00
Nicolas Hake 6c2995fe41 Squelch varargs warnings in System.ocg
The engine (extra)warns whenever you use Par() or ... inside of a
function that is not declared as taking a variable number of arguments.
Change the declaration of all System.ocg varargs functions so it is
immediately obvious.
2014-12-12 23:27:17 +01:00
Maikel de Vries c6802b8776 increase game content version entries to 6.0 2014-12-12 22:58:16 +01:00
Sven Eberhardt d17226bbc2 Added ambience test version of DeepSeaMining. 2014-12-09 23:51:40 +01:00
Sven Eberhardt 2808a3983b Move FlightlessBird from Objects.ocd to Experimental.ocd.
Moved because it causes annoying errors on startup. It's not even a full definition and the material doesn't seem to be used anywhere.
2014-12-09 23:37:38 +01:00
Sven Eberhardt bb3203ff63 Added new ambience object to Experimental.ocd.
Controls the music playlist according to the situation the player's clonk is currently in.
2014-12-07 19:54:17 +01:00
Armin Burgmeier 89f8fb9fef Add (auto-generated) normal maps for most resources 2014-11-26 17:58:52 -05:00
Armin Burgmeier 254e1e4631 Apply drawtransform on sprite normal map
This makes the normals point into the correct direction for transformed
objects, which is for example the case when they are rotated with SetR.
2014-11-26 17:56:43 -05:00
Armin Burgmeier e58b62920c Change extension of shader files from .c to .glsl 2014-11-25 11:54:36 -05:00
Armin Burgmeier 192dddec6f Use the new shader system for rendering sprites
This now also avoids the use of conditionals in shaders by using different
shaders instead.
2014-11-24 14:51:08 -05:00
Armin Burgmeier a7f9ba1e91 Compute ambient texture coordinate based on fragment coordinate
This will allow to use the same shader slice also for the sprite and mesh
shaders.
2014-11-24 14:51:08 -05:00
Peter Wortmann e0ce489587 Treat light values below a certain threshold as darkness
This is the "lazy" fix for the problem that lightness never returned to
full zero. On the other hand, it probably is also the right one - after
all, with smoothing the last 8 or so light intensity values are lost to
us anyway.
2014-11-23 20:03:57 +01:00
Armin Burgmeier db6df15377 Add SetAmbientBrightness and GetAmbientBrightness script functions 2014-11-20 17:07:31 -05:00
Peter Wortmann 7fea618221 Collected trivial bug-fixes
Turns out we actually can't optimise out the second texture normal
lookup - it makes a noticeable difference in-game. Also there was
possible slice collision, it might be worth warning about this kind
of stuff.

Also removed unused variable, and made error messages more consistent
in terms of whitespace.
2014-11-20 21:44:11 +01:00
Peter Wortmann 72289713f9 Modular shader system
The idea here is that we compose shaders out of "slices", which can
come from the engine ("built-in"), from files or possibly even from
models. This should allow us to more easily share the code between
different rendering shaders (e.g. for lights / normals).

TODO: Workarounds not yet implemented, so this might degrade less
gracefully.
2014-11-20 11:52:14 +01:00
Armin Burgmeier 48456f5f99 Fix transparency in regions with no ambient and low dynamic light 2014-11-18 16:33:27 -05:00
Armin Burgmeier ee33c58cfe Don't apply the dot product to transparency in lighting calculation
This fixes the transparency issue with the coconut tree.
2014-11-17 20:51:18 -05:00
Armin Burgmeier 88f8f75441 Add ambient lighting
This introduces a new texture, an ambient light map, that is generated
automatically at the beginning of the round by the sky portion of the
landscape. This basically makes everything that is close to sky visible
by default.

The shaders have been adapted so that they deploy direction-independent
lighting for the ambient component, and the current (diffuse) behaviour
for the diffuse component. This makes the shaders use an additional
texture unit that represents the ambient light. We can think about merging
this information into the light texture, but the coordinate systems are
different at the moment, so this could be performed at the stage of light
texture generation.

For meshes, the ambient material is not actually used, but instead a
diffuse light from the front is used. This makes many meshes look more
interesting, maybe also because the ambient material setting of most
meshes are not set correctly at the moment.
2014-11-17 09:35:50 -05:00
Armin Burgmeier 00447dd524 Merge branch 'master' into lights 2014-11-12 08:47:43 -05:00
Maikel de Vries fb707a8634 fixed tutorial 3 flint drop (#1171) 2014-11-09 14:38:30 +01:00
Armin Burgmeier a1d653415d Fix typo in elevator description (github #3) 2014-11-07 20:25:16 -05:00
Armin Burgmeier 53f4185958 Add auto-generated normal maps for the firestone graphics 2014-11-07 15:29:32 -05:00
Armin Burgmeier 219fa8597c Implement light calculations for meshes 2014-11-06 15:56:19 -05:00
Armin Burgmeier a6d949d313 Merge branch 'master' into lights 2014-11-04 11:26:45 -05:00
Armin Burgmeier e9b4ddc426 Fix texture name in normal map shader 2014-11-03 14:38:17 -05:00
Maikel de Vries 856e37a360 fix c4script error in clonkcontrol library 2014-10-28 18:01:59 +01:00
Maikel de Vries dd239b97a5 fix c4script error when producer creates object that deletes itself 2014-10-28 18:01:12 +01:00
Maikel de Vries 0c883b0948 balance structure costs
This reduces the time to construct a basic settlement, which should improve game play.
2014-10-27 19:30:45 +01:00
Armin Burgmeier d09651ab1b Add base mesh material for normal maps
This can be derived from by other materials to actually use a normal map
with a single base texture.
2014-10-26 21:32:08 -04:00
Maikel de Vries 8c16a9b4d7 moved all particle definition into separate folder Particles.ocd
This adds a bit more structure to Objects.ocd and particles could be further organized into different subfolders.
2014-10-26 19:49:22 +01:00
Maikel de Vries 868b17b6d7 improved difficulties for Krakatoa 2014-10-26 15:58:48 +01:00
Maikel de Vries 399524330d new title image for Krakatoa 2014-10-26 11:27:25 +01:00
Maikel de Vries e715fd4e70 Krakatoa: new goal and intro sequence 2014-10-24 21:57:05 +02:00
Maikel de Vries 3e48809c20 removed unused var effect in expansion goal 2014-10-24 20:24:13 +02:00
Maikel de Vries 1fa2cffe4b moved crashed airplane skin to Decoration.ocd
This allows other scenarios to use the skin besides DarkCastle
2014-10-24 18:05:03 +02:00
Maikel de Vries add7f23251 moved plane crash sound to plane object
This makes it usable in other scenarios besides DarkCastle
2014-10-24 17:50:55 +02:00
Maikel de Vries 6c1e45519d fixed player spawning in Krakatoa 2014-10-22 16:32:22 +02:00
Maikel de Vries 717ea1a031 reworked Krakatoa landscape, is now map script 2014-10-22 16:23:32 +02:00
Sven Eberhardt aadd8176cb AcidRift: Fix scale precipitation, meteorites and rockfall by map size. 2014-10-21 21:18:10 +02:00
Sven Eberhardt 516cd46c37 AcidRift: Scale precipitation, meteorites and rockfall by map size.
(in addition to scaling on difficulty)
2014-10-21 20:48:09 +02:00
Maikel de Vries f05c5a3439 move ownership radius on movement of the flag 2014-10-20 20:27:14 +02:00
Maikel de Vries b2daf0453d power producers which include flag library are not staticback any more 2014-10-20 18:56:13 +02:00
Sven Eberhardt 0a4b941a97 Rockfall dissolves when hitting the ground in acid. 2014-10-19 20:19:47 +02:00
Sven Eberhardt 257cbf1a9f Insane difficulty of Acid Rift tweaked. 2014-10-19 20:01:55 +02:00
Sven Eberhardt 8a7a96a453 More rain in Acid Rift. 2014-10-19 17:12:17 +02:00
Sven Eberhardt 896ea0a875 Make acid a bit less corrosive.
It currently eats through everything and destroys itself in the process. Maybe this change makes it actually a bit more deadly than before.
2014-10-19 17:03:19 +02:00
Maikel de Vries b5a84eba87 move TransposeArray to System.ocg functions 2014-10-19 10:49:12 +02:00
Maikel de Vries c6d87151d4 allow to cut the pump's source and drain (#1144) 2014-10-18 19:12:55 +02:00
Maikel de Vries 406821f92a correct difficulty for acid rift 2014-10-18 18:42:30 +02:00
Maikel de Vries 85646c7a8e removed cloud vertices 2014-10-18 18:41:56 +02:00
Maikel de Vries 13ab324603 improved smoke for some structures 2014-10-18 15:49:44 +02:00
Maikel de Vries d72338f167 add test scenario for power system 2014-10-18 15:41:49 +02:00
Maikel de Vries 83930ee27f fixed cloud movement in ironpeak(#1149) 2014-10-18 12:52:06 +02:00
Maikel de Vries 1d34c12431 fixed underwater dropping of second hand item (#1155) 2014-10-18 12:00:49 +02:00
Maikel de Vries 18ee7b0496 increased chest content count and make cabin non-enterable (#1159) 2014-10-18 11:47:23 +02:00
Maikel de Vries 46c4b8df5c added object name to menu item tooltips (#1146) 2014-10-18 09:57:49 +02:00
Sven Eberhardt d80ef4ae5e Fix nil pointer if a dragged object is deleted between control creation and control execution. 2014-10-18 01:22:47 +02:00
Sven Eberhardt 1f3c53cec1 New world: Acid Rift. 2014-10-18 01:19:21 +02:00
Sven Eberhardt ea65a24ec6 Make gems non-corrodable.
It's annoying in acid gem mining scenarios.
2014-10-18 01:19:21 +02:00
Sven Eberhardt 0e8e20fa5c Add explosive mode for rockfall.
Makes it a bit more deadly by blasting through rock and granite.
2014-10-18 01:19:18 +02:00
Tobias Zwick 848b844424 add commented shader part for debugging light directions 2014-10-12 21:01:47 +02:00
Maikel de Vries 9142faff36 more loam for Chine on normal difficulty 2014-10-12 16:56:34 +02:00
Armin Burgmeier e5d1182cce Add the Anim_RDir AVP 2014-10-09 17:11:13 -04:00
Armin Burgmeier e4ad7ddc2d Rename Anim_RDir to Anim_AbsRDir 2014-10-09 17:07:52 -04:00
Armin Burgmeier 9fb0cdbdef Add a min_rdir parameter to Anim_RDir 2014-10-09 17:05:24 -04:00
Armin Burgmeier cbdc6040e7 Add the Anim_Dist AVP 2014-10-09 17:00:26 -04:00
Sven Eberhardt ca64fad8b5 Fix lobby team distribution settings hotkeys (#1133) 2014-10-09 20:40:01 +02:00
Armin Burgmeier af6163b797 Add test scenario for many lava PXS and smoke particles 2014-10-08 18:33:46 -04:00
Tobias Zwick b11e8d5d7a Merge branch 'master' into lights
Conflicts:
	planet/Graphics.ocg/LandscapeShader.c
	src/graphics/C4DrawGLMesh.cpp
	src/graphics/C4DrawGL.cpp
	src/landscape/C4Landscape.cpp
	src/landscape/C4Landscape.h
	src/landscape/C4LandscapeRender.cpp
	src/landscape/C4Scenario.cpp
	src/landscape/C4Scenario.h
2014-10-06 23:27:16 +02:00
Nicolas Hake 67c0deae38 Remove leading + from IDS_MSG_AUTOFRAMESKIP DE translation (Github #2) 2014-10-06 16:03:11 +02:00
Tobias Zwick d662d5001e DarkCastle: correct German translation of game goal 2014-10-04 23:23:52 +02:00
Sven Eberhardt 5c72ed090d DarkCastle map rework.
Make it harder to get into the castle.
2014-10-04 22:57:50 +02:00
Sven Eberhardt d3ac2789cb DarkCastle intro sequence added. 2014-10-04 22:40:17 +02:00
Sven Eberhardt 57ddbf9fa6 Fix initial speed of airplane on StartInstantFlight call. 2014-10-04 19:39:06 +02:00
Sven Eberhardt 885f240e54 AI ignores contained enemies. 2014-10-04 19:39:06 +02:00
Maikel de Vries d5cb53b952 title images for the worlds 2014-10-04 13:12:29 +02:00
Sven Eberhardt 77f4170b5a Raid made more failsafe: Wood barrel respawn and removed a deadly gap in the landscape. 2014-10-04 11:33:45 +02:00
Sven Eberhardt 91e285a39d Fix typo in Deep Sea Mining intro 2014-10-04 11:24:58 +02:00
Sven Eberhardt 5d81d27669 Fix outro in Deep Sea Mining.
The Crystal Communicator didn't even start D:
2014-10-04 11:24:58 +02:00
Sven Eberhardt 0b0fb55b0f Fix NextMission buttons in missions folder. 2014-10-04 11:24:53 +02:00
Maikel de Vries 8d5d4715fe remove physical documentation 2014-10-04 09:22:10 +02:00
Armin Burgmeier 6d0daba7b6 Fix another typo in Raid.ocs 2014-10-04 00:03:15 -04:00
Sven Eberhardt b0af163c24 Better wheat placement in Crash Landing. 2014-10-04 00:59:24 +02:00
Clonkonaut f98514efdc Merge branch 'master' of ssh://git.openclonk.org/openclonk 2014-10-04 00:48:28 +02:00
Clonkonaut 8ffe3fadb7 Merge branch 'master' of ssh://git.openclonk.org/openclonk 2014-10-04 00:47:13 +02:00
Tobias Zwick c271ccc564 fix some typos in Raid.ocs, convert to utf8 2014-10-04 00:47:05 +02:00