XEffects - Black Screen on Some Computers?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Ruxify
Posts: 33
Joined: Tue Oct 16, 2012 12:37 am

XEffects - Black Screen on Some Computers?

Post by Ruxify »

So I'm using the XEffects library for lighting and shadows and I have strange issue. On certain computers, on the effectmanager->update(), all I get is a black screen. I am using DirectX 9 as my driver. Here are the specs of the computer that causes this:

Code: Select all

------------------
System Information
------------------
Time of this report: 2/21/2014, 09:52:50
       Machine name: 706-INT-11
   Operating System: Windows 7 Enterprise 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_ldr.130828-1532)
           Language: English (Regional Setting: English)
System Manufacturer: Hewlett-Packard
       System Model: HP Z220 SFF Workstation
               BIOS: Default System BIOS
          Processor: Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (4 CPUs), ~3.2GHz
             Memory: 8192MB RAM
Available OS Memory: 8066MB RAM
          Page File: 2319MB used, 13812MB available
        Windows Dir: C:\Windows
    DirectX Version: DirectX 11
DX Setup Parameters: Not found
   User DPI Setting: Using System DPI
 System DPI Setting: 96 DPI (100 percent)
    DWM DPI Scaling: Disabled
     DxDiag Version: 6.01.7601.17514 32bit Unicode
 
------------
DxDiag Notes
------------
      Display Tab 1: No problems found.
        Sound Tab 1: No problems found.
          Input Tab: No problems found.
 
--------------------
DirectX Debug Levels
--------------------
Direct3D:    0/4 (retail)
DirectDraw:  0/4 (retail)
DirectInput: 0/5 (retail)
DirectMusic: 0/5 (retail)
DirectPlay:  0/9 (retail)
DirectSound: 0/5 (retail)
DirectShow:  0/6 (retail)
 
---------------
Display Devices
---------------
          Card name: Intel(R) HD Graphics
       Manufacturer: Intel Corporation
          Chip type: Intel(R) HD Graphics Family
           DAC type: Internal
         Device Key: Enum\PCI\VEN_8086&DEV_0152&SUBSYS_1791103C&REV_09
     Display Memory: 1696 MB
   Dedicated Memory: 64 MB
      Shared Memory: 1632 MB
       Current Mode: 1920 x 1080 (32 bit) (60Hz)
       Monitor Name: Generic PnP Monitor
      Monitor Model: HP LA2206
         Monitor Id: HWP2948
        Native Mode: 1920 x 1080(p) (60.000Hz)
        Output Type: HD15
        Driver Name: igdumd64.dll,igd10umd64.dll,igd10umd64.dll,igdumd32,igd10umd32,igd10umd32
Driver File Version: 9.17.0010.2867 (English)
     Driver Version: 9.17.10.2867
        DDI Version: 11
       Driver Model: WDDM 1.1
  Driver Attributes: Final Retail
   Driver Date/Size: 10/10/2012 02:22:32, 12604416 bytes
        WHQL Logo'd: n/a
    WHQL Date Stamp: n/a
  Device Identifier: {D7B78E66-4212-11CF-BF78-9B37B7C2C435}
          Vendor ID: 0x8086
          Device ID: 0x0152
          SubSys ID: 0x1791103C
        Revision ID: 0x0009
 Driver Strong Name: oem39.inf:Intel.Mfg.NTamd64:iIVBD0:9.17.10.2867:pci\ven_8086&dev_0152
     Rank Of Driver: 00E02001
        Video Accel: 
      Deinterlace Caps: n/a
       D3D9 Overlay: Supported
            DXVA-HD: Supported
       DDraw Status: Not Available
         D3D Status: Enabled
         AGP Status: Not Available
 
-------------
Sound Devices
-------------
            Description: Speakers (Realtek High Definition Audio)
 Default Sound Playback: Yes
 Default Voice Playback: Yes
            Hardware ID: HDAUDIO\FUNC_01&VEN_10EC&DEV_0221&SUBSYS_103C1791&REV_1000
        Manufacturer ID: 1
             Product ID: 100
                   Type: WDM
            Driver Name: RTKVHD64.sys
         Driver Version: 6.00.0001.6526 (English)
      Driver Attributes: Final Retail
            WHQL Logo'd: n/a
          Date and Size: 12/13/2011 18:27:30, 4718952 bytes
            Other Files: 
        Driver Provider: Realtek Semiconductor Corp.
         HW Accel Level: Basic
              Cap Flags: 0x0
    Min/Max Sample Rate: 0, 0
Static/Strm HW Mix Bufs: 0, 0
 Static/Strm HW 3D Bufs: 0, 0
              HW Memory: 0
       Voice Management: No
 EAX(tm) 2.0 Listen/Src: No, No
   I3DL2(tm) Listen/Src: No, No
Sensaura(tm) ZoomFX(tm): No
 
---------------------
Sound Capture Devices
---------------------
-------------------
DirectInput Devices
-------------------
      Device Name: Mouse
         Attached: 1
    Controller ID: n/a
Vendor/Product ID: n/a
        FF Driver: n/a
 
      Device Name: Keyboard
         Attached: 1
    Controller ID: n/a
Vendor/Product ID: n/a
        FF Driver: n/a
 
Poll w/ Interrupt: No
 
-----------
USB Devices
-----------
+ USB Root Hub
| Vendor/Product ID: 0x8086, 0x1E26
| Matching Device ID: usb\root_hub20
| Service: usbhub
| 
+-+ Generic USB Hub
| | Vendor/Product ID: 0x8087, 0x0024
| | Location: Port_#0001.Hub_#0002
| | Matching Device ID: usb\class_09
| | Service: usbhub
 
----------------
Gameport Devices
----------------
 
------------
PS/2 Devices
------------
+ Standard PS/2 Keyboard
| Matching Device ID: *pnp0303
| Service: i8042prt
| 
+ Terminal Server Keyboard Driver
| Matching Device ID: root\rdp_kbd
| Upper Filters: kbdclass
| Service: TermDD
| 
+ Microsoft PS/2 Mouse
| Matching Device ID: *pnp0f03
| Service: i8042prt
| 
+ Terminal Server Mouse Driver
| Matching Device ID: root\rdp_mou
| Upper Filters: mouclass
| Service: TermDD
 
------------------------
Disk & DVD/CD-ROM Drives
------------------------
      Drive: C:
 Free Space: 140.9 GB
Total Space: 238.4 GB
File System: NTFS
      Model: WDC WD5000AAKX-60U6AA0
 
      Drive: D:
      Model: hp DVD A  DH16ACSHR
     Driver: c:\windows\system32\drivers\cdrom.sys, 6.01.7601.17514 (English), , 0 bytes
 
--------------
System Devices
--------------
     Name: PCI GDIHOOK5
Device ID: ROOT\DISPLAY\0000
   Driver: n/a
 
     Name: Standard Enhanced PCI to USB Host Controller
Device ID: PCI\VEN_8086&DEV_1E2D&SUBSYS_1791103C&REV_04\3&11583659&2&D0
   Driver: n/a
 
     Name: Standard Enhanced PCI to USB Host Controller
Device ID: PCI\VEN_8086&DEV_1E26&SUBSYS_1791103C&REV_04\3&11583659&2&E8
   Driver: n/a
 
     Name: Intel(R) Desktop/Workstation/Server Express Chipset SATA RAID Controller
Device ID: PCI\VEN_8086&DEV_2822&SUBSYS_1791103C&REV_04\3&11583659&2&FA
   Driver: n/a
 
     Name: Intel(R) 7 Series/C216 Chipset Family SMBus Host Controller - 1E22
Device ID: PCI\VEN_8086&DEV_1E22&SUBSYS_1791103C&REV_04\3&11583659&2&FB
   Driver: n/a
 
     Name: Intel(R) 82801 PCI Bridge - 244E
Device ID: PCI\VEN_8086&DEV_244E&SUBSYS_1791103C&REV_A4\3&11583659&2&F0
   Driver: n/a
 
     Name: High Definition Audio Controller
Device ID: PCI\VEN_8086&DEV_1E20&SUBSYS_1791103C&REV_04\3&11583659&2&D8
   Driver: n/a
 
     Name: PCI standard ISA bridge
Device ID: PCI\VEN_8086&DEV_1E53&SUBSYS_1791103C&REV_04\3&11583659&2&F8
   Driver: n/a
 
     Name: Intel(R) 82579LM Gigabit Network Connection
Device ID: PCI\VEN_8086&DEV_1502&SUBSYS_1791103C&REV_04\3&11583659&2&C8
   Driver: n/a
 
     Name: Intel(R) Active Management Technology - SOL (COM3)
Device ID: PCI\VEN_8086&DEV_1E3D&SUBSYS_1791103C&REV_04\3&11583659&2&B3
   Driver: n/a
 
     Name: Intel(R) HD Graphics
Device ID: PCI\VEN_8086&DEV_0152&SUBSYS_1791103C&REV_09\3&11583659&2&10
   Driver: n/a
 
     Name: Intel(R) Management Engine Interface 
Device ID: PCI\VEN_8086&DEV_1E3A&SUBSYS_1791103C&REV_04\3&11583659&2&B0
   Driver: n/a
 
     Name: PCI standard host CPU bridge
Device ID: PCI\VEN_8086&DEV_0150&SUBSYS_1791103C&REV_09\3&11583659&2&00
   Driver: n/a
 
     Name: Intel(R) USB 3.0 eXtensible Host Controller
Device ID: PCI\VEN_8086&DEV_1E31&SUBSYS_1791103C&REV_04\3&11583659&2&A0
   Driver: n/a
 
------------------
DirectShow Filters
------------------
 
DirectShow Filters:
WMAudio Decoder DMO,0x00800800,1,1,WMADMOD.DLL,6.01.7601.17514
WMAPro over S/PDIF DMO,0x00600800,1,1,WMADMOD.DLL,6.01.7601.17514
WMSpeech Decoder DMO,0x00600800,1,1,WMSPDMOD.DLL,6.01.7601.17514
MP3 Decoder DMO,0x00600800,1,1,mp3dmod.dll,6.01.7600.16385
Mpeg4s Decoder DMO,0x00800001,1,1,mp4sdecd.dll,6.01.7600.16385
WMV Screen decoder DMO,0x00600800,1,1,wmvsdecd.dll,6.01.7601.17514
WMVideo Decoder DMO,0x00800001,1,1,wmvdecod.dll,6.01.7601.18221
Mpeg43 Decoder DMO,0x00800001,1,1,mp43decd.dll,6.01.7600.16385
Mpeg4 Decoder DMO,0x00800001,1,1,mpg4decd.dll,6.01.7600.16385
WMT VIH2 Fix,0x00200000,1,1,WLXVAFilt.dll,15.04.3508.1109
Record Queue,0x00200000,1,1,WLXVAFilt.dll,15.04.3508.1109
WMT Switch Filter,0x00200000,1,1,WLXVAFilt.dll,15.04.3508.1109
WMT Virtual Renderer,0x00200000,1,0,WLXVAFilt.dll,15.04.3508.1109
WMT DV Extract,0x00200000,1,1,WLXVAFilt.dll,15.04.3508.1109
WMT Virtual Source,0x00200000,0,1,WLXVAFilt.dll,15.04.3508.1109
WMT Sample Information Filter,0x00200000,1,1,WLXVAFilt.dll,15.04.3508.1109
DV Muxer,0x00400000,0,0,qdv.dll,6.06.7601.17514
Color Space Converter,0x00400001,1,1,quartz.dll,6.06.7601.17713
WM ASF Reader,0x00400000,0,0,qasf.dll,12.00.7601.17514
Screen Capture filter,0x00200000,0,1,wmpsrcwp.dll,12.00.7601.17514
AVI Splitter,0x00600000,1,1,quartz.dll,6.06.7601.17713
VGA 16 Color Ditherer,0x00400000,1,1,quartz.dll,6.06.7601.17713
SBE2MediaTypeProfile,0x00200000,0,0,sbe.dll,6.06.7601.17528
Microsoft DTV-DVD Video Decoder,0x005fffff,2,4,msmpeg2vdec.dll,12.00.9200.16426
AC3 Parser Filter,0x00600000,1,1,mpg2splt.ax,6.06.7601.17528
StreamBufferSink,0x00200000,0,0,sbe.dll,6.06.7601.17528
MJPEG Decompressor,0x00600000,1,1,quartz.dll,6.06.7601.17713
MPEG-I Stream Splitter,0x00600000,1,2,quartz.dll,6.06.7601.17713
SAMI (CC) Parser,0x00400000,1,1,quartz.dll,6.06.7601.17713
VBI Codec,0x00600000,1,4,VBICodec.ax,6.06.7601.17514
MPEG-2 Splitter,0x005fffff,1,0,mpg2splt.ax,6.06.7601.17528
Closed Captions Analysis Filter,0x00200000,2,5,cca.dll,6.06.7601.17514
SBE2FileScan,0x00200000,0,0,sbe.dll,6.06.7601.17528
Microsoft MPEG-2 Video Encoder,0x00200000,1,1,msmpeg2enc.dll,6.01.7601.17514
Internal Script Command Renderer,0x00800001,1,0,quartz.dll,6.06.7601.17713
MPEG Audio Decoder,0x03680001,1,1,quartz.dll,6.06.7601.17713
DV Splitter,0x00600000,1,2,qdv.dll,6.06.7601.17514
Video Mixing Renderer 9,0x00200000,1,0,quartz.dll,6.06.7601.17713
Microsoft MPEG-2 Encoder,0x00200000,2,1,msmpeg2enc.dll,6.01.7601.17514
ACM Wrapper,0x00600000,1,1,quartz.dll,6.06.7601.17713
Video Renderer,0x00800001,1,0,quartz.dll,6.06.7601.17713
MPEG-2 Video Stream Analyzer,0x00200000,0,0,sbe.dll,6.06.7601.17528
Line 21 Decoder,0x00600000,1,1,qdvd.dll,6.06.7601.17835
Video Port Manager,0x00600000,2,1,quartz.dll,6.06.7601.17713
Video Renderer,0x00400000,1,0,quartz.dll,6.06.7601.17713
File Writer,0x00200000,1,0,WLXVAFilt.dll,15.04.3508.1109
VPS Decoder,0x00200000,0,0,WSTPager.ax,6.06.7601.17514
WM ASF Writer,0x00400000,0,0,qasf.dll,12.00.7601.17514
VBI Surface Allocator,0x00600000,1,1,vbisurf.ax,6.01.7601.17514
File writer,0x00200000,1,0,qcap.dll,6.06.7601.17514
iTV Data Sink,0x00600000,1,0,itvdata.dll,6.06.7601.17514
iTV Data Capture filter,0x00600000,1,1,itvdata.dll,6.06.7601.17514
DVD Navigator,0x00200000,0,3,qdvd.dll,6.06.7601.17835
Overlay Mixer2,0x00200000,1,1,qdvd.dll,6.06.7601.17835
AVI Draw,0x00600064,9,1,quartz.dll,6.06.7601.17713
RDP DShow Redirection Filter,0xffffffff,1,0,DShowRdpFilter.dll,
Microsoft MPEG-2 Audio Encoder,0x00200000,1,1,msmpeg2enc.dll,6.01.7601.17514
WST Pager,0x00200000,1,1,WSTPager.ax,6.06.7601.17514
MPEG-2 Demultiplexer,0x00600000,1,1,mpg2splt.ax,6.06.7601.17528
DV Video Decoder,0x00800000,1,1,qdv.dll,6.06.7601.17514
SampleGrabber,0x00200000,1,1,qedit.dll,6.06.7601.18175
Null Renderer,0x00200000,1,0,qedit.dll,6.06.7601.18175
MPEG-2 Sections and Tables,0x005fffff,1,0,Mpeg2Data.ax,6.06.7601.17514
Microsoft AC3 Encoder,0x00200000,1,1,msac3enc.dll,6.01.7601.17514
StreamBufferSource,0x00200000,0,0,sbe.dll,6.06.7601.17528
Smart Tee,0x00200000,1,2,qcap.dll,6.06.7601.17514
Overlay Mixer,0x00200000,0,0,qdvd.dll,6.06.7601.17835
AVI Decompressor,0x00600000,1,1,quartz.dll,6.06.7601.17713
AVI/WAV File Source,0x00400000,0,2,quartz.dll,6.06.7601.17713
Wave Parser,0x00400000,1,1,quartz.dll,6.06.7601.17713
MIDI Parser,0x00400000,1,1,quartz.dll,6.06.7601.17713
Multi-file Parser,0x00400000,1,1,quartz.dll,6.06.7601.17713
File stream renderer,0x00400000,1,1,quartz.dll,6.06.7601.17713
Microsoft DTV-DVD Audio Decoder,0x005fffff,1,1,msmpeg2adec.dll,6.01.7140.0000
StreamBufferSink2,0x00200000,0,0,sbe.dll,6.06.7601.17528
AVI Mux,0x00200000,1,0,qcap.dll,6.06.7601.17514
Line 21 Decoder 2,0x00600002,1,1,quartz.dll,6.06.7601.17713
File Source (Async.),0x00400000,0,1,quartz.dll,6.06.7601.17713
File Source (URL),0x00400000,0,1,quartz.dll,6.06.7601.17713
Infinite Pin Tee Filter,0x00200000,1,1,qcap.dll,6.06.7601.17514
Enhanced Video Renderer,0x00200000,1,0,evr.dll,6.01.7601.17514
BDA MPEG2 Transport Information Filter,0x00200000,2,0,psisrndr.ax,6.06.7601.17669
MPEG Video Decoder,0x40000001,1,1,quartz.dll,6.06.7601.17713
 
WDM Streaming Tee/Splitter Devices:
Tee/Sink-to-Sink Converter,0x00200000,1,1,ksproxy.ax,6.01.7601.17514
 
Video Compressors:
WMVideo8 Encoder DMO,0x00600800,1,1,wmvxencd.dll,6.01.7600.16385
WMVideo9 Encoder DMO,0x00600800,1,1,wmvencod.dll,6.01.7600.16385
MSScreen 9 encoder DMO,0x00600800,1,1,wmvsencd.dll,6.01.7600.16385
DV Video Encoder,0x00200000,0,0,qdv.dll,6.06.7601.17514
MJPEG Compressor,0x00200000,0,0,quartz.dll,6.06.7601.17713
Cinepak Codec by Radius,0x00200000,1,1,qcap.dll,6.06.7601.17514
Intel IYUV codec,0x00200000,1,1,qcap.dll,6.06.7601.17514
Intel IYUV codec,0x00200000,1,1,qcap.dll,6.06.7601.17514
Microsoft RLE,0x00200000,1,1,qcap.dll,6.06.7601.17514
Microsoft Video 1,0x00200000,1,1,qcap.dll,6.06.7601.17514
 
Audio Compressors:
WM Speech Encoder DMO,0x00600800,1,1,WMSPDMOE.DLL,6.01.7600.16385
WMAudio Encoder DMO,0x00600800,1,1,WMADMOE.DLL,6.01.7600.16385
IMA ADPCM,0x00200000,1,1,quartz.dll,6.06.7601.17713
PCM,0x00200000,1,1,quartz.dll,6.06.7601.17713
Microsoft ADPCM,0x00200000,1,1,quartz.dll,6.06.7601.17713
GSM 6.10,0x00200000,1,1,quartz.dll,6.06.7601.17713
CCITT A-Law,0x00200000,1,1,quartz.dll,6.06.7601.17713
CCITT u-Law,0x00200000,1,1,quartz.dll,6.06.7601.17713
MPEG Layer-3,0x00200000,1,1,quartz.dll,6.06.7601.17713
 
PBDA CP Filters:
PBDA DTFilter,0x00600000,1,1,CPFilters.dll,6.06.7601.17528
PBDA ETFilter,0x00200000,0,0,CPFilters.dll,6.06.7601.17528
PBDA PTFilter,0x00200000,0,0,CPFilters.dll,6.06.7601.17528
 
Midi Renderers:
Default MidiOut Device,0x00800000,1,0,quartz.dll,6.06.7601.17713
Microsoft GS Wavetable Synth,0x00200000,1,0,quartz.dll,6.06.7601.17713
 
WDM Streaming Capture Devices:
Realtek HD Audio Line input,0x00200000,1,1,ksproxy.ax,6.01.7601.17514
Realtek HD Audio Mic input,0x00200000,1,1,ksproxy.ax,6.01.7601.17514
Realtek HD Audio Stereo input,0x00200000,1,1,ksproxy.ax,6.01.7601.17514
 
WDM Streaming Rendering Devices:
Realtek HD Audio output,0x00200000,1,1,ksproxy.ax,6.01.7601.17514
 
BDA Network Providers:
Microsoft ATSC Network Provider,0x00200000,0,1,MSDvbNP.ax,6.06.7601.17514
Microsoft DVBC Network Provider,0x00200000,0,1,MSDvbNP.ax,6.06.7601.17514
Microsoft DVBS Network Provider,0x00200000,0,1,MSDvbNP.ax,6.06.7601.17514
Microsoft DVBT Network Provider,0x00200000,0,1,MSDvbNP.ax,6.06.7601.17514
Microsoft Network Provider,0x00200000,0,1,MSNP.ax,6.06.7601.17514
 
Multi-Instance Capable VBI Codecs:
VBI Codec,0x00600000,1,4,VBICodec.ax,6.06.7601.17514
 
BDA Transport Information Renderers:
BDA MPEG2 Transport Information Filter,0x00600000,2,0,psisrndr.ax,6.06.7601.17669
MPEG-2 Sections and Tables,0x00600000,1,0,Mpeg2Data.ax,6.06.7601.17514
 
BDA CP/CA Filters:
Decrypt/Tag,0x00600000,1,1,EncDec.dll,6.06.7601.17708
Encrypt/Tag,0x00200000,0,0,EncDec.dll,6.06.7601.17708
PTFilter,0x00200000,0,0,EncDec.dll,6.06.7601.17708
XDS Codec,0x00200000,0,0,EncDec.dll,6.06.7601.17708
 
WDM Streaming Communication Transforms:
Tee/Sink-to-Sink Converter,0x00200000,1,1,ksproxy.ax,6.01.7601.17514
 
Audio Renderers:
Speakers (Realtek High Definiti,0x00200000,1,0,quartz.dll,6.06.7601.17713
Default DirectSound Device,0x00800000,1,0,quartz.dll,6.06.7601.17713
Default WaveOut Device,0x00200000,1,0,quartz.dll,6.06.7601.17713
DirectSound: Speakers (Realtek High Definition Audio),0x00200000,1,0,quartz.dll,6.06.7601.17713
 
---------------
EVR Power Information
---------------
Current Setting: {5C67A112-A4C9-483F-B4A7-1D473BECAFDC} (Quality) 
  Quality Flags: 2576
    Enabled:
    Force throttling
    Allow half deinterlace
    Allow scaling
    Decode Power Usage: 100
  Balanced Flags: 1424
    Enabled:
    Force throttling
    Allow batching
    Force half deinterlace
    Force scaling
    Decode Power Usage: 50
  PowerFlags: 1424
    Enabled:
    Force throttling
    Allow batching
    Force half deinterlace
    Force scaling
    Decode Power Usage: 0
 
Basically everything else I've tried seems to work fine. What's the deal?

EDIT: If I had to guess, would it have to do with the lack of a good graphics card? These computers where it doesn't work have an integrated Intel one, and the computers where it does work have a good card. Would it make a difference if I used OpenGL or some other rendering device? Or should I just make my game detect whether it's using a good card or not to use XEffects or not?
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: XEffects - Black Screen on Some Computers?

Post by mongoose7 »

It is unlikely to be the graphics card. Are you running the same executable on both systems? Have you fixed XEffects for Irrlicht 1.8?
Ruxify
Posts: 33
Joined: Tue Oct 16, 2012 12:37 am

Re: XEffects - Black Screen on Some Computers?

Post by Ruxify »

mongoose7 wrote:It is unlikely to be the graphics card. Are you running the same executable on both systems? Have you fixed XEffects for Irrlicht 1.8?
Yep, exact same .exe.

I don't know what you mean by "fixed". It works perfectly fine on all the computers I've tested with graphics cards, and not at all on the computers I've tested without them (using integrated graphics).
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: XEffects - Black Screen on Some Computers?

Post by mongoose7 »

The depth texture is, I believe, a floating point texture. I'm guessing that this is not supported on the integrated GPUs. I guess you could check the return code. If it's not this, maybe the textures aren't power of two, but I think the original XEffects only defines POT textures.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: XEffects - Black Screen on Some Computers?

Post by Nadro »

Orginal XEffects uses float interface for send texture id uniforms. Use int interface and all should works fine.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Ruxify
Posts: 33
Joined: Tue Oct 16, 2012 12:37 am

Re: XEffects - Black Screen on Some Computers?

Post by Ruxify »

Nadro wrote:Orginal XEffects uses float interface for send texture id uniforms. Use int interface and all should works fine.
Uh... this is somewhat embarrassing, but I am not much of a graphics programmer. I may need a little more guidance to try this. I don't even know where to begin.
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: XEffects - Black Screen on Some Computers?

Post by mongoose7 »

I think he means, XEffects sends 1, 2, 3 or 4 as a sampler uniform. These are integers, but they are sent as floats. You should be sending them as integers. As I said, you have to *fix* XEffects for Irrlicht 1.8. You could try searching for the relevant posts.
Ruxify
Posts: 33
Joined: Tue Oct 16, 2012 12:37 am

Re: XEffects - Black Screen on Some Computers?

Post by Ruxify »

The only thing I could find was to change EffectCB.h, line 90 from irr::u32 TexVar = 0; to irr::f32 TexVar = 0;, thus preventing a int to float typecast failure... or at least that's what I understand. As of now, I have no idea if this will fix it, as I won't have access to this kind of computer until Monday.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: XEffects - Black Screen on Some Computers?

Post by Nadro »

As moongose7 said you must send s32 uniforms instead of f32 for texture uniforms eg:
f32 TextureID = 0.f; // BAD
services->setVertexShaderConstant("SamplerName", &TextureID, 1); // BAD
-------------------------------------------------
s32 TextureID = 0; // GOOD
services->setVertexShaderConstant("SamplerName", &TextureID, 1); // GOOD
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Ruxify
Posts: 33
Joined: Tue Oct 16, 2012 12:37 am

Re: XEffects - Black Screen on Some Computers?

Post by Ruxify »

Nadro wrote:As moongose7 said you must send s32 uniforms instead of f32 for texture uniforms eg:
f32 TextureID = 0.f; // BAD
services->setVertexShaderConstant("SamplerName", &TextureID, 1); // BAD
-------------------------------------------------
s32 TextureID = 0; // GOOD
services->setVertexShaderConstant("SamplerName", &TextureID, 1); // GOOD
The issue isn't WHAT to do, but rather WHERE to do it. I am perfectly aware of the differences between a float and an integer.
Do I have to find all instances of "setVertextShaderConstant" and make sure the second parameter is an integer? Or is it only on certain instances?


So for example in EffectCB.h, I would change the class ShadowShaderCB from

Code: Select all

class ShadowShaderCB : public video::IShaderConstantSetCallBack
{
public:
    ShadowShaderCB(EffectHandler* effectIn) : effect(effectIn) {};
 
    virtual void OnSetMaterial(const SMaterial& material) {}
 
    virtual void OnSetConstants(video::IMaterialRendererServices* services, s32 userData)
    {
        IVideoDriver* driver = services->getVideoDriver();
 
        matrix4 worldViewProj = driver->getTransform(video::ETS_PROJECTION);
        worldViewProj *= driver->getTransform(video::ETS_VIEW);
        worldViewProj *= driver->getTransform(video::ETS_WORLD);
        services->setVertexShaderConstant("mWorldViewProj", worldViewProj.pointer(), 16);
 
        worldViewProj = ProjLink;
        worldViewProj *= ViewLink;
        worldViewProj *= driver->getTransform(video::ETS_WORLD);
        services->setVertexShaderConstant("mWorldViewProj2", worldViewProj.pointer(), 16);
 
        driver->getTransform(video::ETS_WORLD).getInverse(invWorld);
        vector3df lightPosOS = LightLink;
        invWorld.transformVect(lightPosOS);
        services->setVertexShaderConstant("LightPos", reinterpret_cast<f32*>(&lightPosOS.X), 4);
 
        services->setVertexShaderConstant("MaxD", reinterpret_cast<f32*>(&FarLink), 1);
        services->setVertexShaderConstant("MAPRES", &MapRes, 1);
 
        services->setPixelShaderConstant("LightColour", reinterpret_cast<f32*>(&LightColour.r), 4);
    }
 
    EffectHandler* effect;
    core::matrix4 invWorld;
 
    video::SColorf LightColour;
    core::matrix4 ProjLink;
    core::matrix4 ViewLink;
    core::vector3df LightLink;
    f32 FarLink, MapRes;
};
to

Code: Select all

class ShadowShaderCB : public video::IShaderConstantSetCallBack
{
public:
    ShadowShaderCB(EffectHandler* effectIn) : effect(effectIn) {};
 
    virtual void OnSetMaterial(const SMaterial& material) {}
 
    virtual void OnSetConstants(video::IMaterialRendererServices* services, s32 userData)
    {
        IVideoDriver* driver = services->getVideoDriver();
 
        matrix4 worldViewProj = driver->getTransform(video::ETS_PROJECTION);
        worldViewProj *= driver->getTransform(video::ETS_VIEW);
        worldViewProj *= driver->getTransform(video::ETS_WORLD);
        services->setVertexShaderConstant("mWorldViewProj", worldViewProj.pointer(), 16);
 
        worldViewProj = ProjLink;
        worldViewProj *= ViewLink;
        worldViewProj *= driver->getTransform(video::ETS_WORLD);
        services->setVertexShaderConstant("mWorldViewProj2", worldViewProj.pointer(), 16);
 
        driver->getTransform(video::ETS_WORLD).getInverse(invWorld);
        vector3df lightPosOS = LightLink;
        invWorld.transformVect(lightPosOS);
        services->setVertexShaderConstant("LightPos", reinterpret_cast<s32*>(&lightPosOS.X), 4);
 
        services->setVertexShaderConstant("MaxD", reinterpret_cast<s32*>(&FarLink), 1);
        services->setVertexShaderConstant("MAPRES", &MapRes, 1);
 
        services->setPixelShaderConstant("LightColour", reinterpret_cast<s32*>(&LightColour.r), 4);
    }
 
    EffectHandler* effect;
    core::matrix4 invWorld;
 
    video::SColorf LightColour;
    core::matrix4 ProjLink;
    core::matrix4 ViewLink;
    core::vector3df LightLink;
    s32 FarLink, MapRes;
};
Once again, please excuse my severe lack of knowledge in the shading/graphics rendering department.
mikkis
Posts: 64
Joined: Mon Jan 28, 2013 2:38 pm
Location: Fi

Re: XEffects - Black Screen on Some Computers?

Post by mikkis »

In EffectCB.h line 91, 94, 97, 100. These four f32 change to s32. Then opengl works right for me, at least.
Ruxify
Posts: 33
Joined: Tue Oct 16, 2012 12:37 am

Re: XEffects - Black Screen on Some Computers?

Post by Ruxify »

mikkis wrote:In EffectCB.h line 91, 94, 97, 100. These four f32 change to s32. Then opengl works right for me, at least.
Thank you! I will be sure to try it when I get access to one of the "faulty" computers, Monday.
Ruxify
Posts: 33
Joined: Tue Oct 16, 2012 12:37 am

Re: XEffects - Black Screen on Some Computers?

Post by Ruxify »

I keep getting the error "HLSL vertex shader compilation failed." in the console. You say it fixes it for OpenGL at least. Does this fix not work with DirectX 9?
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: XEffects - Black Screen on Some Computers?

Post by mongoose7 »

Your error must be elsewhere. The XEffects changes you were asked to make concern passing uniforms to the shader. This can only occur *after* the shader is compiled.
Ruxify
Posts: 33
Joined: Tue Oct 16, 2012 12:37 am

Re: XEffects - Black Screen on Some Computers?

Post by Ruxify »

...Perhaps it's because I somehow changed the f32 variable declaration before the above mentioned lines to s32. Will report back if it fixes anything. I once again have to wait until I get to the computer.
Post Reply