Commit Graph

144 Commits (master)

Author SHA1 Message Date
Maikel de Vries aa892171fb update version to 8.0 in DefCore.txt, Scenario.txt and Version.txt 2018-01-28 13:18:46 +01:00
Lukas Werling e83ca471c0 Render (updated) credits with C4GUI 2017-12-21 22:57:37 +01:00
Armin Burgmeier 02fa5abc66 Fix material/texture selection in landscape shader (#1841) 2017-08-12 17:01:52 +02:00
Sven Eberhardt 4eae2b28d7 Editor: Fix drop cursor drawing 2016-10-10 21:26:10 -04:00
Sven Eberhardt a7aa89f168 Merge branch 'master' into qteditor
Conflicts:
	planet/Objects.ocd/Structures.ocd/StoneDoor.ocd/SpinWheel.ocd/Script.c
	src/platform/C4WindowSDL.cpp
	src/script/C4AulParse.cpp
	src/script/C4Effect.cpp
2016-06-20 22:27:03 -04:00
Nicolas Hake e9c5facf91 GL: Disable hardware-based skinning on old Intel devices
Our hardware-based skinning doesn't work on certain Intel graphics
devices. Fall back to software skinning on GPUs that return an OpenGL
3.1 context even though we explicitly request a 3.2 one.

Might fix #1459, #1689.
2016-06-19 13:45:12 +02:00
Lukas Werling 19395b23ae Fix SetMatAdjust() (for kenny) 2016-06-18 17:17:43 +02:00
Sven Eberhardt b70882d7fa Editor: Object scaling+rotation 2016-06-17 00:07:49 -04:00
Lukas Werling 19caa65b7b Merge branch 'sdl-gamecontroller' (pull request GH-17) 2016-03-21 16:39:28 +01:00
Lukas Werling 9f69c650d6 Use icons for all controller buttons
The icons currently only show Xbox 360 controller labeling. The icon set
also includes icons for PlayStation controllers, so we could extend this
in the future.
2016-02-21 18:27:02 +01:00
Armin Schäfer 9dca94a6b8 New Title image overlay. 2016-02-20 17:26:43 +01:00
Tobias Zwick 240815bc7c correct Philipp Kern's name in the credit screen 2016-01-17 23:10:35 +01:00
Armin Burgmeier aef7538aa1 Switch shader code to OpenGL 3 style 2016-01-17 11:37:17 -08:00
Armin Burgmeier bc8db0589e Make the mesh material properties uniform variables
Instead of relying on the obsolete glMaterial call.
2016-01-17 11:37:17 -08:00
Armin Burgmeier bb8b933417 Revert "Revert "Replace 3D texture in landscape shader by a 2D texture array""
This reverts commit 4a02d3c77b.

This was merged into master even though I only wanted it in stable-7.0.
Oh well, let's just revert it again.
2016-01-17 11:37:17 -08:00
Clonkonaut 962b178663 Merge remote-tracking branch 'remotes/origin/revert-opengl-2.1' 2016-01-10 17:27:56 +01:00
Tobias Zwick 0976c02d54 Update the Credits
Space is getting scarce , I had to leave out the people who never contributed more than two commits. For 8.0 the credit screen should be reworked to either scroll down or be made for larger resolutions than 800x600.
2016-01-06 19:39:03 +01:00
Armin Burgmeier 4a02d3c77b Revert "Replace 3D texture in landscape shader by a 2D texture array"
This reverts commit 790219ac7e.

This commit broke support for Mac OS X since Apple only supports OpenGL 3.0
with a core profile, not a compatibility profile. Revert this commit
temporarily for the 7.0 release, until we port all OpenGL usage to the core
profile with 8.0.

This fixes #1495.
2016-01-04 18:27:44 -08:00
Armin Burgmeier 96c8b51eac Use generic vertex attributes for landscape rendering 2016-01-02 17:20:24 -08:00
Armin Burgmeier 95774e0e8f Use generic vertex attributes for sprites, meshes, particles 2016-01-02 13:10:03 -08:00
Armin Burgmeier 8766f5123b Remove other usages of built-in GL matrices
Primarily for the FoW rendering, which now also uses (simple) shaders
without ftransform() everywhere. This also removes all GLU calls.
2015-12-31 17:30:21 -08:00
Armin Burgmeier de3ed60aa8 Avoid built-in GL matrices for mesh rendering
Instead, compute the projection, modelview and normal matrices explictly
and upload them as shader uniforms.
2015-12-24 23:02:03 -08:00
Armin Burgmeier a9967e7b16 Avoid built-in GL matrices for sprite rendering
Instead, compute the projection, modelview and normal matrices explictly
and upload them as shader uniforms. This is one step towards using the
OpenGL 3 core profile.
2015-12-19 22:37:36 -08:00
Maikel de Vries d5c390406a change license of loader from CC-BY 2.0 to 3.0
The creator (Nachtfalter) has agreed to this.
2015-12-19 18:41:14 +01:00
Maikel de Vries 350a7b94d4 implement loader from Nachtfalter (see Trello)
It is currenly licensed under CC-BY 2.0 and must be upgraded asap. But it was needed to run the game.
2015-12-19 14:30:44 +01:00
Nicolas Hake d0d83f8e5c Deleted unlicensed images 2015-12-18 21:18:48 +01:00
Armin 7ea79e539f Add Sayneds support of cyrillic letters. The default Clonk font can now display russian words. 2015-12-06 19:56:02 +01:00
Armin 65c2d2c0a0 Add basic title image overlay. 2015-11-07 11:24:55 +01:00
Armin Burgmeier 6dbbb0b90c Enable basic shading in non-FoW viewports 2015-10-18 17:15:18 -04:00
Armin Burgmeier 35006ee170 fix normal map lookup for meshes
This got accidentally reverted with Peter's shader reorganization.
2015-10-18 17:07:55 -04:00
Armin Burgmeier 676b9f895e Increase influence of dynamic light on material edges
It's somewhat experimental by now. The old behaviour can be obtained by
setting normalMapStrengthMax to the same value as normalMapStrengthMin.

I hope this helps a bit with #1418.
2015-10-17 13:36:35 -04:00
Peter Wortmann 328bba2387 Shader adjustments for new materials
Given that the new materials have less structure, we want more pronounced yet
softer borders on the materials.

Also they seem to be using an inverted Y-axis for the normals...
2015-10-07 22:27:20 +01:00
Armin Burgmeier 70a62eb7f9 apply mod2 modulation only to RGB components, not alpha (#1416) 2015-10-05 19:02:24 -04:00
Peter Wortmann f312aa3883 Yet more shading rebalancing, reorganised constants
There are a number of knobs here that you can meaningfully turn, but
so far they were a bit buried in the code, plus you couldn't easily
override them. By putting them into the "init" slice, it should now
be relatively easy to experiment with light effects.

Concrete changes:

* Skip lighting computation completely without OC_DYNAMIC_LIGHT. Means
  that we don't have to fiddle with lighting parameters any more to make
  sure that we just get the original texturing.

* Ambient level automatically adjusts so that a Z normal reproduces the
  texture in its original brigthness. Might want to change this if we
  want the game to be brighter than the UI.

* Don't apply FoW to the Sky - implemented properly this time. We'll
  see whether this is a good idea.
2015-10-04 14:24:49 +01:00
Peter Wortmann 530bc1deef Rebalance shading
This attempts to replicate the look of the "rim shading" change using
less insane methods. Notably

 1. Use the same light normals for objects and landscape
 2. Change extend_normal so it is less "extreme" (= light is coming from
    the front more often)
 3. Ramp up weight of edge normals for landscape significantly so they
    doesn't *completely* disappear.
 4. Ambient light 200% brighter, point lights 150% brighter.
2015-10-03 15:32:39 +01:00
Peter Wortmann cf4ed1b0b7 Shiny materials, shader reorganisation
This implements the proposal made in the forum for "shiny" materials -
material can now determine the angle at which the most light is reflected.
Shiny materials might set this lower to approximate a "reflection" effect,
and increase the "spottiness" at the same time. To compensate for the
lack of brightness without light, "emittance" can be used.

Not sure this is the most elegant way to model this - the "proper" way
here would be to have emittance, shading and specular as three separate
light parameters instead of molding one into the other and using the third
to compensate.

Furthermore, this reorganises shaders in a major way: We reduce the
number of shader files down to three, pushing a number of possible
configurations into preprocessor. I believe this should be easier to
understand, which for the moment trumps theoretical extensibility
benefits.
2015-10-03 15:32:39 +01:00
Armin Burgmeier 653680b296 Revert "Add Scale parameter in materials"
This reverts commit 8ef1f908cc. This seems to be
a performance bottleneck on some graphics cards and/or drivers. Clonkonaut
reports issues with a Radeon HD 7800.

This feature is not vital since textures can always be drawn such that they
tile properly at 512x512. While that particular problem with the Radeon card
could probably be worked around, it's just not worth it.
2015-09-19 17:26:46 -04:00
Armin Burgmeier 8ef1f908cc Add Scale parameter in materials
This allows to scale textures up or down from their initial size, allowing
them to tile at intervals other than 512x512.
2015-09-19 10:48:28 -04:00
Armin Burgmeier 790219ac7e Replace 3D texture in landscape shader by a 2D texture array
A texture array is conceptionally what should be used in this case. One
advantage of this is that we don't have to generate mipmaps ourselves but can
let the graphics driver take care of it. Same for selection of the mipmap
level. This would even allow to choose different mipmap levels for different
textures.

This is a somewhat experimental change since it makes OpenGL 3.0 a hard
requirement for OpenClonk. I expect that this is fine, but if this causes
failures during landscape creation on common hardware/drivers we should
revisit.
2015-09-16 21:45:30 -04:00
Clonkonaut 1c41df401b Racical increase in brightness for the Ambient shader. 2015-09-14 17:08:50 +02:00
Armin Burgmeier f3da8525d0 Prefix most shader defines with "OC_" 2015-09-10 19:45:43 -04:00
Armin Burgmeier db29160fea Revert "revert workaround made for #1368, doesn't work on (certain) Intel chipsets. Instead, limit the maximum bone count to 64 so to meet the limit of 1024 uniform components by certain graphics cards (#1285)"
This reverts commit f57bfa089c.

This was committed by mistake. Fixes #1375.
2015-09-03 20:38:53 -04:00
Tobias Zwick f57bfa089c revert workaround made for #1368, doesn't work on (certain) Intel chipsets. Instead, limit the maximum bone count to 64 so to meet the limit of 1024 uniform components by certain graphics cards (#1285) 2015-08-31 19:28:00 +02:00
Peter Wortmann 30857e835e Shader gamma implementation
In comparison to the old system, this is a downgrade - instead of being
able to set a full color mapping by gamma ramp, we now get just a value
per colour channel.

Upside is that we do not need to play around with the global gamma ramps
any more, which was arguably the wrong way to do it.

This commit will likely break everything that has been using gamma so far.
2015-08-31 17:35:08 +01:00
Peter Wortmann 6a016f807d Alternate light drawing, v2
This is now a "mix" between the original and the alternate drawing
strategy, hopefully combining its strength. In detail:

1. Intensity of light sources aren't added together anymore. Instead,
   the brightest light source decides end brightness pre-smoothing.

2. For smoothing, we update normals more quickly than brightness. This is
   the main change relative to the first "alternate" version. Actually
   quite embarassing that I didn't think of this solution before %)

This is still a tad busier than what we have currently, simply due to
normals changing around more quickly. On the plus side, Clonk faces
shouldn't go dark anymore while walking, so that's something.
2015-08-31 17:35:08 +01:00
Armin Burgmeier edc611f3b1 Add double-sided lighting also for ambient lights 2015-08-03 22:44:04 -04:00
Armin Burgmeier a172245c1e Illuminate materials with no backface culling from both sides
This might need adaptions in some materials, but is probably the right thing
to do.
2015-07-20 22:11:19 -04:00
Mark d45cc7c95b Colored lights improvements
Color value is now uint32_t, removed superfluous conversion to unsigned value, simplification in the shader.

Open: C4DP_Last and number of drawing passes
2015-07-11 17:46:00 +02:00
Mark 02fd798631 Colored lights
The color of object lights can now be changed. This includes the following changes:
- added light test scenario, based on DarkCastle, with some lights,
- new functions SetLightColor() and GetLightColor() with C4Script documentation,
- third drawing pass for rendering the light color, the drawing passes are now referenced by enum,
- the blending of light from multiple colored light sources works correctly with alpha blending,
- light color value affects the intensity of the light,
- alpha blending of the light depends on color value and lightness. This means that brighter (= more value) and lighter (= more whiteish) light will be preferred in blending over other lights,
- the object light color is rendered to the lower half of the fow light texture now,
- the shader accesses the brightness/direction information and color information correctly,

The patch was created from the following commits:
dab898a SetLightColor()
f57286e Color texture experiment
d0702f5 Dynamic color
fa14cdf Light test scenario
f99203d Alternate lights
474bade Bugfixes
3113698 Brightness handled better
516fb21 GetLightColor
1d91ec9 Improvements
3cfbf6c Documentation
95ec185 Improvements: Light Shader
a63bffc Scope of alpha
20c7ca0 Improvement: C4FoWLight
17d9123 Undo code style
d79411b Cleaner code

(cherry picked from commit 36dec610e36860b88417e91ce727250673bc2ec2)

Conflicts:
	src/landscape/fow/C4FoWRegion.cpp, merged
2015-06-28 21:28:40 +02:00
Nicolas Hake d6f219a3df Use 3x4 bones on low MAX_VTX_UNIFORM_COMPS (#1285)
4x3 matrices use the same number of uniform components as 4x4 ones.
If we're short on uniform components, don't transpose the transformation
matrix before sending it to the shader, and transpose it in the shader
itself instead, saving 4 components per bone.
2015-03-18 23:38:20 +01:00