[Closed] [C++] Chams No Stride With Pixel Shader

Discussion in 'N3 Source Codes dan Tutorials' started by dedayzzz, Nov 11, 2013.

Discuss [Closed] [C++] Chams No Stride With Pixel Shader in the N3 Source Codes dan Tutorials area at Nyit-Nyit.Net

Thread Status:
Not open for further replies.
  1. dedayzzz 2 SD Banned

    Messages:
    396
    Likes Received:
    320
    Trophy Points:
    0
    hello world :bow:
    saya sedikit mau sharing aja untuk kalian yang mau test buat chams in game fps seperti pointblankerz nih saya kasih referensi nya hehe
    maaf kalo kurang bermanfaat yah :blush:

    shader function'a
    Code:
    HRESULT GenerateShader(IDirect3DDevice9 *pD3Ddev, IDirect3DPixelShader9 **pShader, float r, float g, float b )
    {
    char szShader[ 256 ];
    ID3DXBuffer *pShaderBuf = NULL;
    sprintf( szShader, "ps_3_0\ndef c0, %f, %f, %f, %f\nmov oC0,c0", r, g, b, 1.0f );
    D3DXAssembleShader( szShader, sizeof( szShader ), NULL, NULL, 0, &pShaderBuf, NULL );
    if( FAILED( pD3Ddev->CreatePixelShader((const DWORD*)pShaderBuf->GetBufferPointer(), pShader)) )return E_FAIL;
    return S_OK;
    }
    
    bool bshaddinge = true; // taruh dimana saja

    taro di endscene
    Code:
    if(bshaddinge)
    {
    GenerateShader( m_pD3Ddev, &pixBlue, 0.0, 0.0, 1.0 );
    GenerateShader( m_pD3Ddev, &pixGreen, 0.0, 1.0, 0.0 );
    GenerateShader( m_pD3Ddev, &pixOrange, 1.0, 0.5, 0.0 );
    GenerateShader( m_pD3Ddev, &pixRed, 1.0, 0.0, 0.0 );
    GenerateShader( m_pD3Ddev, &pixWhite, 1.0, 1.0, 1.0 );
    GenerateShader( m_pD3Ddev, &pixYellow, 1.0, 1.0, 0.0 );
    bshaddinge = false;
    }
    
    taruh di draw indexed primitive / dip
    Code:
    if(shaderchamss)
    {
    if(shadder1)
    {
    DWORD dwOldZEnable = D3DZB_TRUE;
    m_pD3Ddev->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable);
    m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    m_pD3Ddev->SetPixelShader( pixBlue );
    m_pD3Ddev->DrawIndexedPrimitive(Type,BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);	
    m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, dwOldZEnable);
    m_pD3Ddev->SetPixelShader( pixOrange );
    }
    if(shadder2)
    {
    DWORD dwOldZEnable = D3DZB_TRUE;
    m_pD3Ddev->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable);
    m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    m_pD3Ddev->SetPixelShader( pixRed );
    m_pD3Ddev->DrawIndexedPrimitive(Type,BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);	
    m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, dwOldZEnable);
    m_pD3Ddev->SetPixelShader( pixGreen );
    }
    }
    
    Credits : UC Forum
    Edited By Me @BobbyVN3

    maaf kalo ndak berguna :cool2:
    sempurnakan lagi bro agar nyuss di game fps kesayangan kalian
     
    3 people like this.

    Gunakan jasa Rekber N3 untuk menjamin jual beli anda atau menghindari penipuan dengan meng klik disini
  2. BenzSilent Belum Sekolah Level 1

    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    3
    if(shaderchamss){ // On Menu
    if(shadder1){ // Deklarasi kemana ? Stride juga kayanya
    DWORD dwOldZEnable = D3DZB_TRUE;
    m_pD3Ddev->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable);
     
  3. ryan_aditya 2 SD Level 2

    Messages:
    301
    Likes Received:
    28
    Trophy Points:
    53
    clue 2 player pos . cmiw :)
     
  4. dono 3 SMP STAFF N3 Tukang Sapu

    Messages:
    2,403
    Likes Received:
    2,575
    Trophy Points:
    141
    Game:
    Dota 2
    Region:
    Australia
    topik ini sudah tidak disupport lagi

    Thread ini saya tutup karena dengan alasan salah satu diantaranya:
    - Request dari TS
    - Sudah terlalu lama / old topic
    - Tidak bisa didownload/yang disharing TS susah tidak berjalan
    - Barang yang dijual sudah laku

    Jika ada pertanyaan, keberatan atau request untuk di buka kembali silahkan PM moderator atau saya.

    Thanks
     
Thread Status:
Not open for further replies.

Share This Page