View Issue Details

IDProjectCategoryView StatusLast Update
0006082DarkRadiantRendererpublic13.01.2024 05:32
Reportergreebo Assigned Togreebo  
PrioritynormalSeveritynormalReproducibilityhave not tried
Status closedResolutionfixed 
Product Version3.1.0 
Target Version3.2.0Fixed in Version3.2.0 
Summary0006082: Implement sorting of Interaction Stages
DescriptionThe game sorts bump/diffuse/specular stages to process them in a certain order when drawing interaction passes. DarkRadiant only supports one interaction pass per material right now.
Additional InformationSee DarkRadiant's current implementation in OpenGLShader::constructLightingPassesFromMaterial()

See game code: Material::SortInteractionStages() and InteractionStage::DrawInteractions()

Stages are sorted bumps first, then diffuses, then speculars. When drawing interactions a new draw call is queued/submitted for every new stage whose type is already active in that interaction, plus the round-up draw call. For example, the sorted stage setup

Bump
Diffuse1
Diffuse2
Specular

will result in the following three draw calls:

Bump + Diffuse1 + _black
Bump + Diffuse2 + _black
Bump + Diffuse2 + Specular

The second draw call is kind of unintuitive, it is triggered when encountering the specular map (with the _black specular already in place, the specular counts as "second" stage of that type).
TagsNo tags attached.

Relationships

related to 0006039 closedgreebo Material Editor: additional preview object in textures/glass/ materials 

Activities

greebo

greebo

28.08.2022 08:13

administrator   ~0015215

An example material for testing:

textures/glass/two_diffuse_one_bump_one_spec
{
    diffusemap textures/darkmod/glass/victorian01_d
    {
        blend diffusemap
        map textures/darkmod/decals/graffiti/food_not_works
        rgb 0.7
    }
    bumpmap textures/darkmod/glass/dull_opaque01_local
    specularmap textures/darkmod/metal/flat/simple_grey01_s
}
greebo

greebo

28.08.2022 08:28

administrator   ~0015216

Comparison screenshots
grafik.png (662,252 bytes)
grafik-2.png (621,857 bytes)

Related Changesets

DarkRadiant: master 33e16185

27.08.2022 12:17

greebo


Details Diff
0006082: Start rearranging the lighting pass construction code (WIP) Affected Issues
0006082
mod - include/ishaderlayer.h Diff File
mod - radiantcore/rendersystem/backend/OpenGLShader.cpp Diff File

DarkRadiant: master 98473c29

27.08.2022 13:45

greebo


Details Diff
0006082: Handle interaction stages in a similar way as the TDM engine is doing it.
Multiple interaction stages are sorted and grouped very late (right before the draw calls) in a single loop.
Imply that any material without bump stage has is rendered with an implicit _flat map.
Affected Issues
0006082
mod - radiantcore/rendersystem/backend/InteractionPass.cpp Diff File
mod - radiantcore/rendersystem/backend/InteractionPass.h Diff File
mod - radiantcore/rendersystem/backend/OpenGLShader.cpp Diff File
mod - radiantcore/rendersystem/backend/OpenGLShader.h Diff File
mod - radiantcore/rendersystem/backend/OpenGLState.h Diff File
mod - radiantcore/rendersystem/backend/RegularLight.cpp Diff File
mod - radiantcore/rendersystem/backend/RegularLight.h Diff File

Issue History

Date Modified Username Field Change
27.08.2022 07:56 greebo New Issue
27.08.2022 07:57 greebo Additional Information Updated
27.08.2022 07:57 greebo Status new => confirmed
27.08.2022 07:57 greebo Relationship added related to 0006039
28.08.2022 08:10 greebo Changeset attached => DarkRadiant master 33e16185
28.08.2022 08:10 greebo Changeset attached => DarkRadiant master 98473c29
28.08.2022 08:11 greebo Assigned To => greebo
28.08.2022 08:11 greebo Status confirmed => assigned
28.08.2022 08:11 greebo Target Version => 3.2.0
28.08.2022 08:11 greebo Status assigned => resolved
28.08.2022 08:11 greebo Resolution open => fixed
28.08.2022 08:11 greebo Fixed in Version => 3.2.0
28.08.2022 08:13 greebo Note Added: 0015215
28.08.2022 08:28 greebo Note Added: 0015216
28.08.2022 08:28 greebo File Added: grafik.png
28.08.2022 08:28 greebo File Added: grafik-2.png
13.01.2024 05:32 greebo Status resolved => closed