Opened 17 months ago

Closed 16 months ago

Last modified 16 months ago

#6723 closed defect (fixed)

[Vulkan] Lowering shader effects causes black spots on fields

Reported by: Langbart Owned by:
Priority: Should Have Milestone: Alpha 27
Component: Core engine Keywords:
Cc: Patch:

Description (last modified by Langbart)

to reproduce

  • go to settings, enable Vulkan and set Shader effects to a value between 1 ≤ x < 8
  • restart the game (even if Vulkan was already set, and you only adjusted Shader effects)
  • start a map with any civ except Han (rice fields don't have this issue)
    • Hint: skirmishes/nile_river_4p has pre-placed farm fields, well-suited for testing this issue
  • build a farm field and notice the issue seen in the image
    # command line
    pyrogenesis -mod=public -mod=0ad-spirv -conf=rendererbackend:vulkan -autostart="skirmishes/nile_river_4p"  -autostart-civ=1:athen -conf=materialmgr.quality:5
    

further actors with the same issue

  • the problem can also be found in actor|props/flora/grass_tropic_field.xml, which often occurs in the India biome

bisect (update)

[27368] ~35 files contain the basic_trans_wind_grain_norm_spec.xml file, undo the change and the issue disappears

cd binaries/data/mods/public/art
rg --stats --files-with-matches --type xml "basic_trans_wind_grain_norm_spec.xml"

actors/props/flora/grass_summer.xml
actors/props/flora/grass_tropic_field.xml
actors/props/flora/grass_soft_small_tall.xml
actors/props/flora/reeds_giant.xml
actors/props/flora/grass_soft_dry_small_tall.xml
actors/props/flora/grass_soft_large.xml
actors/props/flora/grass_medit_field.xml
actors/props/flora/grass_soft_small.xml
actors/props/flora/grass_field_flowering_tall.xml
actors/props/flora/grass_wispy.xml
actors/props/flora/farming_wheat_harvest_b.xml
actors/props/flora/grass_woody.xml
actors/props/flora/grass_leafy.xml
actors/props/flora/grass_field_dry_tall.xml
actors/props/flora/farming_wheat_harvest_a.xml
actors/props/flora/grass_tropical.xml
actors/props/flora/papyrus.xml
actors/props/flora/grass_soft_dry_small.xml
actors/props/flora/grass_woody_dry.xml
actors/props/flora/cattails_autumn.xml
actors/props/flora/grass_soft_dry_large_tall.xml
actors/props/flora/grass_savanna.xml
actors/props/flora/grass_soft_dry_large.xml
actors/props/flora/grass_temp_field.xml
actors/props/flora/grass_field_dry_tall_b.xml
actors/props/flora/grass_soft_large_tall.xml
actors/props/flora/farming_millet_harvest_d.xml
actors/props/flora/grass_temp_field_dry.xml
actors/props/flora/cattails.xml
actors/props/flora/farming_millet_harvest_b.xml
actors/props/flora/farming_millet_harvest_c.xml
actors/props/flora/farming_barley_harvest_a.xml
actors/props/flora/farming_millet_harvest_a.xml
actors/props/flora/grass_temp_field_brown.xml
actors/props/flora/farming_barley_harvest_b.xml

35 matches
35 matched lines
35 files contained matches
7347 files searched
0 bytes printed
8144330 bytes searched
1.657385 seconds spent searching
0.304723 seconds

note

  • 0ad-spirv version
    {
        "name": "0ad-spirv",
        "version": "0.27.13",
        "label": "SPIR-V shaders",
        "url": "https://play0ad.com",
        "description": "SPIR-V shaders for Vulkan backend.",
        "dependencies": ["0ad>=0.0.27"]
    }
    

Attachments (2)

field.png (406.0 KB ) - added by Langbart 17 months ago.
grass_tropic_field.png (476.7 KB ) - added by Langbart 17 months ago.

Download all attachments as: .zip

Change History (5)

by Langbart, 17 months ago

Attachment: field.png added

by Langbart, 17 months ago

Attachment: grass_tropic_field.png added

comment:1 by Langbart, 17 months ago

Description: modified (diff)
  • update bisect part
  • seems basic_trans_wind_grain_norm_spec.xml is the cause [27368]

EDIT: this would also solve the issue, but I don't know why.

wiki/MaterialSystem#Materials

  • binaries/data/mods/public/art/materials/basic_trans_wind_grain_norm_spec.xml

    a b  
    66    <define name="USE_WIND" value="1"/>
    77    <renderquery name="sim_time"/>
    88    <required_texture name="baseTex"/>
    9     <required_texture name="normTex" define="USE_NORMAL_MAP"/>
    10     <required_texture name="specTex" define="USE_SPECULAR_MAP"/>
    119    <shader effect="model_transparent"/>
    1210    <uniform name="windData" value="6.0 6.0"/>
    1311</material>
Last edited 17 months ago by Langbart (previous) (diff)

comment:2 by Vladislav Belov, 16 months ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

Fixed in r27575.

comment:3 by Langbart, 16 months ago

Description: modified (diff)
  • part of the description was removed by Vladislav, setting the value to 1
Note: See TracTickets for help on using tickets.